diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-11-02 00:29:59 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-11-02 00:29:59 +0000 |
commit | ac868742883a65fc963bae5dcca5a0553576a18a (patch) | |
tree | 7ccbbf79f01873eafc5168f62f9428dd7963dc66 | |
parent | 4450dca5fc610d488ab459e9f3db55ba24f974a2 (diff) |
apply the "depend on" logic in the the default handling of rtr links.
this fixes the use of "depend on" in my situation, which is an
Ethernet (broadcast) interface where I'm actually peering with
multiple routers so i don't have "type p2p" set. with this the ospf
peers now know how to route around my firewalls when their carp
interfaces are in the backup state.
discussed with claudio@ and jmatthew@
ok remi@
-rw-r--r-- | usr.sbin/ospfd/ospfe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c index 9522e5f3b7c..9e04400142b 100644 --- a/usr.sbin/ospfd/ospfe.c +++ b/usr.sbin/ospfd/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.106 2019/04/23 06:18:02 remi Exp $ */ +/* $OpenBSD: ospfe.c,v 1.107 2020/11/02 00:29:58 dlg Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -1058,6 +1058,8 @@ orig_rtr_lsa(struct area *area) if ((oeconf->flags & OSPFD_FLAG_STUB_ROUTER || oe_nofib) && rtr_link.type != LINK_TYPE_STUB_NET) rtr_link.metric = MAX_METRIC; + else if (iface->dependon[0] != '\0' && iface->depend_ok == 0) + rtr_link.metric = MAX_METRIC; else rtr_link.metric = htons(iface->metric); num_links++; |