diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-07-01 17:05:11 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-07-01 22:50:39 +0200 |
commit | 12256b84a540434485b16433f83aa23928405560 (patch) | |
tree | e1ef59c861d62e6527ebe87f6527142f18cfef8d /babeld | |
parent | babeld: Drop in_prefix() function (diff) | |
download | frr-12256b84a540434485b16433f83aa23928405560.tar.xz frr-12256b84a540434485b16433f83aa23928405560.zip |
*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'babeld')
-rw-r--r-- | babeld/kernel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/babeld/kernel.c b/babeld/kernel.c index e3c76bdd9..3941db8d5 100644 --- a/babeld/kernel.c +++ b/babeld/kernel.c @@ -176,11 +176,11 @@ zebra_route(int add, int family, const unsigned char *pref, unsigned short plen, switch (family) { case AF_INET: uchar_to_inaddr(&api_nh->gate.ipv4, gate); - if (IPV4_ADDR_SAME (&api_nh->gate.ipv4, &quagga_prefix.u.prefix4) && - quagga_prefix.prefixlen == 32) { - api_nh->type = NEXTHOP_TYPE_IFINDEX; - } else { - api_nh->type = NEXTHOP_TYPE_IPV4_IFINDEX; + if (IPV4_ADDR_SAME(&api_nh->gate.ipv4, &quagga_prefix.u.prefix4) + && quagga_prefix.prefixlen == IPV4_MAX_BITLEN) { + api_nh->type = NEXTHOP_TYPE_IFINDEX; + } else { + api_nh->type = NEXTHOP_TYPE_IPV4_IFINDEX; } break; case AF_INET6: |