diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-07-01 18:05:11 +0300 | 
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-07-01 23:50:39 +0300 | 
| commit | 12256b84a540434485b16433f83aa23928405560 (patch) | |
| tree | e1ef59c861d62e6527ebe87f6527142f18cfef8d /babeld/kernel.c | |
| parent | 45833edae0fe12c87cdb90f939c07d282959e1b9 (diff) | |
*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'babeld/kernel.c')
| -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 e3c76bdd92..3941db8d5f 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:  | 
