summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_neighbor.h
diff options
context:
space:
mode:
authorPaul Jakma <paul@jakma.org>2015-09-08 15:31:45 +0100
committerPaul Jakma <paul@quagga.net>2015-09-24 15:26:41 +0100
commitc920e510d09c6c4ab63a3da5375009442a950f82 (patch)
tree4ef39abc6d53eed748cd7898621dae21a776e550 /ospfd/ospf_neighbor.h
parent794c4735f81289d9fc603b5fd5e4a5d39dbb5ca5 (diff)
downloadquagga-c920e510d09c6c4ab63a3da5375009442a950f82.tar.bz2
quagga-c920e510d09c6c4ab63a3da5375009442a950f82.tar.xz
ospfd: Fix bug in 94266fa822ba, nbr_self rebuild didn't add valid nbr_self
* 94266fa822ba "ospfd: Self nbrs needs to be rebuilt when router ID changes." deleted the nbr_self, and added it back, but ospf_nbr_add_self doesn't actually create the nbr_self - it assumes it's already there. Leading to use after free and crashes after a router-id change. * ospfd/ospf_neighbor.{c,h}: (ospf_nbr_self_reset) Little helper to reset the nbr_self correctly. * ospf_interface.c: (ospf_if_cleanup) moved code to ospf_nbr_self_reset * ospfd.c: (ospf_router_id_update) Use ospf_nbr_self_reset instead of doing the reset badly, fixing 94266fa822ba.
Diffstat (limited to 'ospfd/ospf_neighbor.h')
-rw-r--r--ospfd/ospf_neighbor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ospfd/ospf_neighbor.h b/ospfd/ospf_neighbor.h
index 25f13524..822c2024 100644
--- a/ospfd/ospf_neighbor.h
+++ b/ospfd/ospf_neighbor.h
@@ -99,6 +99,7 @@ extern struct ospf_neighbor *ospf_nbr_new (struct ospf_interface *);
extern void ospf_nbr_free (struct ospf_neighbor *);
extern void ospf_nbr_delete (struct ospf_neighbor *);
extern int ospf_nbr_bidirectional (struct in_addr *, struct in_addr *, int);
+extern void ospf_nbr_self_reset (struct ospf_interface *);
extern void ospf_nbr_add_self (struct ospf_interface *);
extern int ospf_nbr_count (struct ospf_interface *, int);
#ifdef HAVE_OPAQUE_LSA