]> git.puffer.fish Git - mirror/frr.git/commit
ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command 3209/head
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 19 Oct 2018 18:55:47 +0000 (15:55 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 20 Oct 2018 15:39:05 +0000 (12:39 -0300)
commit98c06e8618fe7c73edddeaf6ac35186521e4604b
tree733399348619641790d9534b8d34328beaa98e17
parent25ee05c93879487a9a6cd1d604b42ba2c71ee1f8
ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command

Add a missing check to bail out earlier when SR is not configured. The
same command without the "no" prefix has the same check as it prevents
unexpected things (i.e. crashes) from happening.

Fixes the following segfaults:
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 65535 no-php-flag"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ospfd/ospf_sr.c