diff options
Diffstat (limited to 'usr.sbin/ospfd/ospfe.c')
-rw-r--r-- | usr.sbin/ospfd/ospfe.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c index 762493cad81..019cc944edb 100644 --- a/usr.sbin/ospfd/ospfe.c +++ b/usr.sbin/ospfd/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.103 2018/09/27 12:34:06 benno Exp $ */ +/* $OpenBSD: ospfe.c,v 1.104 2019/04/23 06:08:57 remi Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -900,7 +900,8 @@ orig_rtr_lsa(struct area *area) if (ibuf_add(buf, &rtr_link, sizeof(rtr_link))) fatalx("orig_rtr_lsa: ibuf_add failed"); } - if (iface->state & IF_STA_POINTTOPOINT) { + if ((iface->flags & IFF_UP) && + LINK_STATE_IS_UP(iface->linkstate)) { log_debug("orig_rtr_lsa: stub net, " "interface %s", iface->name); bzero(&rtr_link, sizeof(rtr_link)); @@ -912,7 +913,11 @@ orig_rtr_lsa(struct area *area) rtr_link.data = iface->mask.s_addr; } rtr_link.type = LINK_TYPE_STUB_NET; - rtr_link.metric = htons(iface->metric); + if (iface->dependon[0] != '\0' && + iface->depend_ok == 0) + rtr_link.metric = MAX_METRIC; + else + rtr_link.metric = htons(iface->metric); num_links++; if (ibuf_add(buf, &rtr_link, sizeof(rtr_link))) fatalx("orig_rtr_lsa: ibuf_add failed"); |