mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 02:20:54 +00:00
Revert "bgpd: optimize bgp_interface_address_del"
This reverts commit fc1dd2e506
.
This commit is contained in:
parent
2fd44b1bbb
commit
72b4ca50d0
@ -389,8 +389,6 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS)
|
|||||||
struct peer *peer;
|
struct peer *peer;
|
||||||
struct bgp *bgp;
|
struct bgp *bgp;
|
||||||
struct prefix *addr;
|
struct prefix *addr;
|
||||||
afi_t afi;
|
|
||||||
safi_t safi;
|
|
||||||
|
|
||||||
bgp = bgp_lookup_by_vrf_id(vrf_id);
|
bgp = bgp_lookup_by_vrf_id(vrf_id);
|
||||||
|
|
||||||
@ -409,8 +407,7 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS)
|
|||||||
|
|
||||||
addr = ifc->address;
|
addr = ifc->address;
|
||||||
|
|
||||||
if (bgp && addr->family == AF_INET6 &&
|
if (bgp) {
|
||||||
!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix)) {
|
|
||||||
/*
|
/*
|
||||||
* When we are using the v6 global as part of the peering
|
* When we are using the v6 global as part of the peering
|
||||||
* nexthops and we are removing it, then we need to
|
* nexthops and we are removing it, then we need to
|
||||||
@ -419,10 +416,17 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS)
|
|||||||
* we do not want the peering to bounce.
|
* we do not want the peering to bounce.
|
||||||
*/
|
*/
|
||||||
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
|
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
|
||||||
if (IPV6_ADDR_SAME(&peer->nexthop.v6_global,
|
afi_t afi;
|
||||||
&addr->u.prefix6)) {
|
safi_t safi;
|
||||||
memset(&peer->nexthop.v6_global, 0,
|
|
||||||
IPV6_MAX_BYTELEN);
|
if (addr->family == AF_INET)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6)
|
||||||
|
&& memcmp(&peer->nexthop.v6_global,
|
||||||
|
&addr->u.prefix6, 16)
|
||||||
|
== 0) {
|
||||||
|
memset(&peer->nexthop.v6_global, 0, 16);
|
||||||
FOREACH_AFI_SAFI (afi, safi)
|
FOREACH_AFI_SAFI (afi, safi)
|
||||||
bgp_announce_route(peer, afi, safi,
|
bgp_announce_route(peer, afi, safi,
|
||||||
true);
|
true);
|
||||||
|
Loading…
Reference in New Issue
Block a user