mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
eigrpd: Fix possible use after free in nbr deletion
Coverity is complaining about use after free's in clearing eigrp neighbors. Clean the code up to not have the problem. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
2de45ca1b4
commit
694fb7f48f
|
@ -333,7 +333,7 @@ DEFPY (clear_ip_eigrp_neighbors,
|
|||
eigrp_hello_send(ei, EIGRP_HELLO_GRACEFUL_SHUTDOWN, NULL);
|
||||
|
||||
/* iterate over all neighbors on eigrp interface */
|
||||
frr_each (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
|
||||
frr_each_safe (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
|
||||
if (nbr->state != EIGRP_NEIGHBOR_DOWN) {
|
||||
zlog_debug(
|
||||
"Neighbor %pI4 (%s) is down: manually cleared",
|
||||
|
@ -393,7 +393,7 @@ DEFPY (clear_ip_eigrp_neighbors_int,
|
|||
eigrp_hello_send(ei, EIGRP_HELLO_GRACEFUL_SHUTDOWN, NULL);
|
||||
|
||||
/* iterate over all neighbors on eigrp interface */
|
||||
frr_each (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
|
||||
frr_each_safe (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
|
||||
if (nbr->state != EIGRP_NEIGHBOR_DOWN) {
|
||||
zlog_debug(
|
||||
"Neighbor %pI4 (%s) is down: manually cleared",
|
||||
|
|
Loading…
Reference in a new issue