summaryrefslogtreecommitdiffstats
path: root/pimd/pim_nht.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-06-08 13:12:26 +0200
committerGitHub <noreply@github.com>2018-06-08 13:12:26 +0200
commit52cd2dfebc058882091ed3bdc17e4cfd9c3689e1 (patch)
treee355edb75bee07c37d65eb8123f763f6e0b1f4e5 /pimd/pim_nht.c
parentMerge pull request #2377 from ajones-rvbd/ajones-issue-2375 (diff)
parentpimd: Fix nexthop determination when sending towards RP (diff)
downloadfrr-52cd2dfebc058882091ed3bdc17e4cfd9c3689e1.tar.xz
frr-52cd2dfebc058882091ed3bdc17e4cfd9c3689e1.zip
Merge pull request #2347 from gromit1811/pim-connected-nexthop-fix
pimd: Fix nexthop determination when sending towards RP
Diffstat (limited to 'pimd/pim_nht.c')
-rw-r--r--pimd/pim_nht.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c
index 1248363a6..3cbd11a9a 100644
--- a/pimd/pim_nht.c
+++ b/pimd/pim_nht.c
@@ -657,11 +657,20 @@ int pim_parse_nexthop_update(int command, struct zclient *zclient,
nexthop = nexthop_from_zapi_nexthop(&nhr.nexthops[i]);
switch (nexthop->type) {
case NEXTHOP_TYPE_IPV4:
- case NEXTHOP_TYPE_IFINDEX:
case NEXTHOP_TYPE_IPV4_IFINDEX:
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_BLACKHOLE:
break;
+ case NEXTHOP_TYPE_IFINDEX:
+ /*
+ * Connected route (i.e. no nexthop), use
+ * RPF address from nexthop cache (i.e.
+ * destination) as PIM nexthop.
+ */
+ nexthop->type = NEXTHOP_TYPE_IPV4;
+ nexthop->gate.ipv4 =
+ pnc->rpf.rpf_addr.u.prefix4;
+ break;
case NEXTHOP_TYPE_IPV6_IFINDEX:
ifp1 = if_lookup_by_index(nexthop->ifindex,
pim->vrf_id);