summaryrefslogtreecommitdiff
path: root/babeld/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'babeld/kernel.c')
-rw-r--r--babeld/kernel.c10
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: