Merge pull request #9093 from rgirada/nbr_crash

ospfd: ospfd crash while giving 'clear ip ospf neighbor'
This commit is contained in:
Russ White 2021-07-20 15:25:07 -04:00 committed by GitHub
commit 2c4fdef90a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}