summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2018-02-22 07:43:29 +0000
committerclaudio <claudio@openbsd.org>2018-02-22 07:43:29 +0000
commit031a0b2ee159ceffb2bf3cadc9a30c5aca7f4e8a (patch)
tree481a7306ed0617639129a8a0a08e6c7963b51011
parentThe IF_EVT_NBR_CHNG event needs to be fired when a neighbor transitions to (diff)
downloadwireguard-openbsd-031a0b2ee159ceffb2bf3cadc9a30c5aca7f4e8a.tar.xz
wireguard-openbsd-031a0b2ee159ceffb2bf3cadc9a30c5aca7f4e8a.zip
Same change as rev 1.22 in ospfd:
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/ospf6d/hello.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ospf6d/hello.c b/usr.sbin/ospf6d/hello.c
index fc31d96f0e5..13dff3a94fd 100644
--- a/usr.sbin/ospf6d/hello.c
+++ b/usr.sbin/ospf6d/hello.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hello.c,v 1.17 2014/11/18 20:54:28 krw Exp $ */
+/* $OpenBSD: hello.c,v 1.18 2018/02/22 07:43:29 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -173,7 +173,6 @@ recv_hello(struct iface *iface, struct in6_addr *src, u_int32_t rtr_id,
nbr->dr.s_addr = hello.d_rtr;
nbr->bdr.s_addr = hello.bd_rtr;
nbr->priority = LSA_24_GETHI(ntohl(hello.opts));
- nbr_change = 1;
}
/* actually the neighbor address shouldn't be stored on virtual links */
@@ -186,8 +185,10 @@ recv_hello(struct iface *iface, struct in6_addr *src, u_int32_t rtr_id,
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);