]> git.puffer.fish Git - matthieu/frr.git/commit
ospfd: Prevent crash if transferring config amongst instances
authorDonald Sharp <sharpd@nvidia.com>
Tue, 13 Oct 2020 12:16:15 +0000 (08:16 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 13 Oct 2020 12:16:15 +0000 (08:16 -0400)
commit2b0a32da60eca7d5f9f348ed8bd414ff9eabdf5a
tree87cbe6ef58e111f2dbf0e981d380e5955bfa0866
parentd2a516dc7a53a90b401efdd7ecf9fb95d57b2548
ospfd: Prevent crash if transferring config amongst instances

If we enter:

int eth0
  ip ospf area 0
  ip ospf 10 area 0
!

This will crash ospf.  Prevent this from happening.

OSPF instances:

a) Cannot be mixed with non-instance
b) Are their own process.

Since in multi-instance world ospf instances are their own process,
when an ospf processes receives an instance command we must remove
our config( if present ) and allow the new config to be active
in the new process.  The problem here is that if you have not
done a `router ospf` above the lookup of the ospf pointer will
fail and we will just crash.  Put some code in to prevent a crash
in this case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd/ospf_vty.c