mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 06:59:21 +00:00
bgpd: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
135e9bdb69
commit
3036004116
@ -405,7 +405,7 @@ int rfapiGetVncTunnelUnAddr(struct attr *attr, struct prefix *p)
|
||||
case 8:
|
||||
if (p) {
|
||||
p->family = AF_INET;
|
||||
p->prefixlen = 32;
|
||||
p->prefixlen = IPV4_MAX_BITLEN;
|
||||
memcpy(p->u.val, pEncap->value,
|
||||
4);
|
||||
}
|
||||
@ -445,7 +445,7 @@ int rfapiGetUnAddrOfVpnBi(struct bgp_path_info *bpi, struct prefix *p)
|
||||
if (p) {
|
||||
p->family = bpi->extra->vnc.import.un_family;
|
||||
p->u.prefix4 = bpi->extra->vnc.import.un.addr4;
|
||||
p->prefixlen = 32;
|
||||
p->prefixlen = IPV4_MAX_BITLEN;
|
||||
}
|
||||
return 0;
|
||||
case AF_INET6:
|
||||
@ -2519,7 +2519,7 @@ void rfapiNexthop2Prefix(struct attr *attr, struct prefix *p)
|
||||
switch (p->family = BGP_MP_NEXTHOP_FAMILY(attr->mp_nexthop_len)) {
|
||||
case AF_INET:
|
||||
p->u.prefix4 = attr->mp_nexthop_global_in;
|
||||
p->prefixlen = 32;
|
||||
p->prefixlen = IPV4_MAX_BITLEN;
|
||||
break;
|
||||
|
||||
case AF_INET6:
|
||||
@ -2537,7 +2537,7 @@ void rfapiUnicastNexthop2Prefix(afi_t afi, struct attr *attr, struct prefix *p)
|
||||
{
|
||||
if (afi == AFI_IP) {
|
||||
p->family = AF_INET;
|
||||
p->prefixlen = 32;
|
||||
p->prefixlen = IPV4_MAX_BITLEN;
|
||||
p->u.prefix4 = attr->nexthop;
|
||||
} else {
|
||||
rfapiNexthop2Prefix(attr, p);
|
||||
@ -2871,7 +2871,7 @@ static int rfapiGetNexthop(struct attr *attr, struct prefix *prefix)
|
||||
switch (BGP_MP_NEXTHOP_FAMILY(attr->mp_nexthop_len)) {
|
||||
case AF_INET:
|
||||
prefix->family = AF_INET;
|
||||
prefix->prefixlen = 32;
|
||||
prefix->prefixlen = IPV4_MAX_BITLEN;
|
||||
prefix->u.prefix4 = attr->mp_nexthop_global_in;
|
||||
break;
|
||||
case AF_INET6:
|
||||
|
@ -260,7 +260,7 @@ int rfapiRaddr2Qprefix(struct rfapi_ip_addr *hia, struct prefix *pfx)
|
||||
|
||||
switch (hia->addr_family) {
|
||||
case AF_INET:
|
||||
pfx->prefixlen = 32;
|
||||
pfx->prefixlen = IPV4_MAX_BITLEN;
|
||||
pfx->u.prefix4 = hia->addr.v4;
|
||||
break;
|
||||
case AF_INET6:
|
||||
|
@ -164,7 +164,7 @@ static int getce(struct bgp *bgp, struct attr *attr, struct prefix *pfx_ce)
|
||||
memset((uint8_t *)pfx_ce, 0, sizeof(*pfx_ce));
|
||||
memcpy(&pfx_ce->u.prefix4, ecp + 2, 4);
|
||||
pfx_ce->family = AF_INET;
|
||||
pfx_ce->prefixlen = 32;
|
||||
pfx_ce->prefixlen = IPV4_MAX_BITLEN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user