summaryrefslogtreecommitdiff
path: root/pimd/pim_zlookup.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-08 13:50:48 -0400
committerGitHub <noreply@github.com>2018-06-08 13:50:48 -0400
commitc0efc5989f1582158051a9dedea78afa27d3b09f (patch)
treef37cf8e3954e5cf6858fd8ad0f2eb18d9b12fdc4 /pimd/pim_zlookup.c
parent9eafc8abd74a4d8144c764e0361dbb2a51da91c9 (diff)
parent56c1568b3d78e6e15c8fa230c6ed0e29419e2341 (diff)
Merge pull request #2386 from gromit1811/pim-connected-nexthop-fix2
pimd: Fix connected route nexthop fix from 66f5152f
Diffstat (limited to 'pimd/pim_zlookup.c')
-rw-r--r--pimd/pim_zlookup.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 9295b231cb..fb616e1b0d 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -215,6 +215,8 @@ static int zclient_read_nexthop(struct pim_instance *pim,
tab_size, addr_str, pim->vrf->name);
return num_ifindex;
}
+ nexthop_tab[num_ifindex].protocol_distance = distance;
+ nexthop_tab[num_ifindex].route_metric = metric;
switch (nexthop_type) {
case NEXTHOP_TYPE_IFINDEX:
nexthop_tab[num_ifindex].ifindex = stream_getl(s);
@@ -276,13 +278,19 @@ static int zclient_read_nexthop(struct pim_instance *pim,
}
++num_ifindex;
break;
- case NEXTHOP_TYPE_IPV6:
- case NEXTHOP_TYPE_BLACKHOLE:
- /* ignore */
- continue;
+ default:
+ /* do nothing */
+ {
+ char addr_str[INET_ADDRSTRLEN];
+ pim_inet4_dump("<addr?>", addr, addr_str,
+ sizeof(addr_str));
+ zlog_warn(
+ "%s: found non-ifindex nexthop type=%d for address %s(%s)",
+ __PRETTY_FUNCTION__, nexthop_type,
+ addr_str, pim->vrf->name);
+ }
+ break;
}
- nexthop_tab[num_ifindex].protocol_distance = distance;
- nexthop_tab[num_ifindex].route_metric = metric;
}
return num_ifindex;