summaryrefslogtreecommitdiff
path: root/pimd/pim_nht.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_nht.c')
-rw-r--r--pimd/pim_nht.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c
index 60b7c73d43..68d43c0556 100644
--- a/pimd/pim_nht.c
+++ b/pimd/pim_nht.c
@@ -788,7 +788,11 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS)
case NEXTHOP_TYPE_IPV6_IFINDEX:
ifp1 = if_lookup_by_index(nexthop->ifindex,
pim->vrf_id);
- nbr = pim_neighbor_find_if(ifp1);
+
+ if (!ifp1)
+ nbr = NULL;
+ else
+ nbr = pim_neighbor_find_if(ifp1);
/* Overwrite with Nbr address as NH addr */
if (nbr)
nexthop->gate.ipv4 = nbr->source_addr;