diff options
author | 2018-02-22 07:42:38 +0000 | |
---|---|---|
committer | 2018-02-22 07:42:38 +0000 | |
commit | bd0b23ee7cf54c59d508c50e3ac834393ea6cd12 (patch) | |
tree | 8fe4abe9502161d3e305c6a9ca68f654b739b7dc | |
parent | don't get in the way of setting the rdomain on gre(4) (diff) | |
download | wireguard-openbsd-bd0b23ee7cf54c59d508c50e3ac834393ea6cd12.tar.xz wireguard-openbsd-bd0b23ee7cf54c59d508c50e3ac834393ea6cd12.zip |
The IF_EVT_NBR_CHNG event needs to be fired when a neighbor transitions to
a state of 2-Way or higher. There is no need to trigger the event for new
neighbors. With this situations with multiple DRs after a netsplit should
be solved.
OK sthen@ and remi@
-rw-r--r-- | usr.sbin/ospfd/hello.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/hello.c b/usr.sbin/ospfd/hello.c index afb64a3f267..59dc14b746b 100644 --- a/usr.sbin/ospfd/hello.c +++ b/usr.sbin/ospfd/hello.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hello.c,v 1.21 2014/11/18 20:54:29 krw Exp $ */ +/* $OpenBSD: hello.c,v 1.22 2018/02/22 07:42:38 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -188,7 +188,6 @@ recv_hello(struct iface *iface, struct in_addr src, u_int32_t rtr_id, char *buf, nbr->dr.s_addr = hello.d_rtr; nbr->bdr.s_addr = hello.bd_rtr; nbr->priority = hello.rtr_priority; - nbr_change = 1; } /* actually the neighbor address shouldn't be stored on virtual links */ @@ -201,8 +200,10 @@ recv_hello(struct iface *iface, struct in_addr src, u_int32_t rtr_id, char *buf, memcpy(&nbr_id, buf, sizeof(nbr_id)); if (nbr_id == ospfe_router_id()) { /* seen myself */ - if (nbr->state & NBR_STA_PRELIM) + if (nbr->state & NBR_STA_PRELIM) { nbr_fsm(nbr, NBR_EVT_2_WAY_RCVD); + nbr_change = 1; + } break; } buf += sizeof(nbr_id); |