diff options
author | rgirada <rgirada@vmware.com> | 2021-07-20 13:39:05 +0200 |
---|---|---|
committer | rgirada <rgirada@vmware.com> | 2021-07-20 13:39:05 +0200 |
commit | c88ad8ec5b309132b6319fd5677e427d5d8ac12c (patch) | |
tree | 01c904df767db710666a290d8cfad783372b97a6 /ospfd | |
parent | Merge pull request #8554 from mjstapp/evpn_workqueue (diff) | |
download | frr-c88ad8ec5b309132b6319fd5677e427d5d8ac12c.tar.xz frr-c88ad8ec5b309132b6319fd5677e427d5d8ac12c.zip |
ospfd: ospfd crash while giving 'clear ip ospf neighbor'
Description:
Ospf process crashes upon giving 'clear ip ospf neighbor' with
self routerId. It is asserting if it is a self neighbor in ospf
neighbour kill event processing.
Added a check to validate the provided router-id is self
router-id.
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_vty.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 2cb3ec089..bf2a8564f 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -11389,6 +11389,11 @@ DEFPY (clear_ip_ospf_neighbor, if (!ospf->oi_running) continue; + if (nbr_id_str && IPV4_ADDR_SAME(&ospf->router_id, &nbr_id)) { + vty_out(vty, "Self router-id is not allowed.\r\n "); + return CMD_SUCCESS; + } + ospf_neighbor_reset(ospf, nbr_id, nbr_id_str); } |