diff options
author | hasso <hasso> | 2005-05-26 10:29:07 +0200 |
---|---|---|
committer | hasso <hasso> | 2005-05-26 10:29:07 +0200 |
commit | b6b7cff22df912938f6cfd755dcad8cf915be2d0 (patch) | |
tree | 26599303f4a7b7364d8d2750f3126b013d78b781 /bgpd/bgpd.c | |
parent | * rip_routemap.c: In case of '0.0.0.0' used as 'nexthop', use sender (diff) | |
download | frr-b6b7cff22df912938f6cfd755dcad8cf915be2d0.tar.xz frr-b6b7cff22df912938f6cfd755dcad8cf915be2d0.zip |
* bgpd.c: Don't crash while deleting list of peer-groups.
[backport candidate]
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index c19956826..f96966102 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1912,6 +1912,7 @@ int bgp_delete (struct bgp *bgp) { struct peer *peer; + struct peer_group *group; struct listnode *node; struct listnode *next; afi_t afi; @@ -1927,8 +1928,8 @@ bgp_delete (struct bgp *bgp) if (i != ZEBRA_ROUTE_BGP) bgp_redistribute_unset (bgp, afi, i); - bgp->group->del = (void (*)(void *)) peer_group_delete; - list_delete (bgp->group); + for (ALL_LIST_ELEMENTS (bgp->group, node, next, group)) + peer_group_delete (group); for (ALL_LIST_ELEMENTS (bgp->peer, node, next, peer)) peer_delete (peer); |