diff options
author | paul <paul> | 2006-04-03 21:25:32 +0000 |
---|---|---|
committer | paul <paul> | 2006-04-03 21:25:32 +0000 |
commit | 6325e035a3d504fc27ae622d4587eabe66481cf5 (patch) | |
tree | dd1637b36cd3bd21ca3b30d0ba7372d0e2d2c7d0 /ospfd/ospf_nsm.c | |
parent | 44f744b08362492ef2d7a64bf321fef233f2dc22 (diff) | |
download | quagga-6325e035a3d504fc27ae622d4587eabe66481cf5.tar.bz2 quagga-6325e035a3d504fc27ae622d4587eabe66481cf5.tar.xz |
[ospfd] Fix virtual-link handling in nbrs route-table, exposed by bug#234 fix
2006-04-03 Paul Jakma <paul.jakma@sun.com>
* (general) Fix issues with handling of Vlinks and entries
in the nbrs route-table which were highlighted by the
nsm/nbr_self fixes from bug #234. Many thanks to Juergen
Kammer for his help and efforts in testing out debug patches to
pinpoint the issue.
* ospf_interface.c: (ospf_vl_new) Add nbr_self for Vlink.
* ospf_neighbor.c: (ospf_nbr_key) new static function, helper
to create key in nbrs table for a given nbr.
(ospf_nbr_delete) Use ospf_nbr_key. Add an assert() to
document an expected state.
(ospf_nbr_add_self) Ditto.
(ospf_nbr_lookup_by_addr) Add an assert.
* ospf_nsm.c: (nsm_kill_nbr) Can never kill the nbr_self
psuedo-neighbour.
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r-- | ospfd/ospf_nsm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index bfd565ef..8a93f0e6 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -440,6 +440,11 @@ nsm_kill_nbr (struct ospf_neighbor *nbr) /* call it here because we cannot call it from ospf_nsm_event */ nsm_change_state (nbr, NSM_Down); + /* killing nbr_self is invalid */ + assert (nbr != nbr->oi->nbr_self); + if (nbr == nbr->oi->nbr_self) + return 1; + /* Reset neighbor. */ nsm_reset_nbr (nbr); |