diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2024-12-22 02:02:09 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2024-12-22 02:11:20 +0100 |
| commit | 3bc44ee5ebf09b72a769009e19f88429cf9e474a (patch) | |
| tree | 644586791f55211644ee022890fe094f86133c30 | |
| parent | 8cd73c792c7669d7ce1ec3ca17c3d1992040cad6 (diff) | |
bgpd: Replace 16 integer with IPV6_MAX_BYTELEN
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
| -rw-r--r-- | bgpd/bgp_zebra.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index e414039348..d0a016c066 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -421,10 +421,9 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) if (addr->family == AF_INET) continue; - if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) - && memcmp(&peer->nexthop.v6_global, - &addr->u.prefix6, 16) - == 0) { + if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) && + memcmp(&peer->nexthop.v6_global, &addr->u.prefix6, IPV6_MAX_BYTELEN) == + 0) { memset(&peer->nexthop.v6_global, 0, 16); FOREACH_AFI_SAFI (afi, safi) bgp_announce_route(peer, afi, safi, |
