bgpd: Replace 16 integer with IPV6_MAX_BYTELEN

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
This commit is contained in:
Carmine Scarpitta 2024-12-22 02:09:44 +01:00
parent 3bc44ee5eb
commit cfab26b180

View File

@ -424,7 +424,7 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS)
if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) && if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) &&
memcmp(&peer->nexthop.v6_global, &addr->u.prefix6, IPV6_MAX_BYTELEN) == memcmp(&peer->nexthop.v6_global, &addr->u.prefix6, IPV6_MAX_BYTELEN) ==
0) { 0) {
memset(&peer->nexthop.v6_global, 0, 16); memset(&peer->nexthop.v6_global, 0, IPV6_MAX_BYTELEN);
FOREACH_AFI_SAFI (afi, safi) FOREACH_AFI_SAFI (afi, safi)
bgp_announce_route(peer, afi, safi, bgp_announce_route(peer, afi, safi,
true); true);