]> git.proxmox.com Git - mirror_frr.git/commit
ospfd: Fix bug in 94266fa822ba, nbr_self rebuild didn't add valid nbr_self
authorPaul Jakma <paul@jakma.org>
Tue, 8 Sep 2015 14:31:45 +0000 (15:31 +0100)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 15:33:31 +0000 (15:33 +0000)
commitcdd0c84970dfa98e0232011eb7c7241805c9e4eb
tree33e7df5bbeb354f33b5e3a7e90a6f88b12a814eb
parenta2d2c0d2268863f6a6300f8e5b9df98276329fad
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.

(cherry picked from commit c920e510d09c6c4ab63a3da5375009442a950f82)
ospfd/ospf_interface.c
ospfd/ospf_neighbor.c
ospfd/ospf_neighbor.h
ospfd/ospfd.c