diff options
| author | Sri Mohana Singamsetty <srimohans@gmail.com> | 2019-08-08 09:57:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-08 09:57:18 -0700 |
| commit | 3af7a9e92f4b32eea19c7e14ae163710fa8b7e77 (patch) | |
| tree | c9d03f0c0ff6543d125f2c4f1c0e112ce70764aa | |
| parent | 76eb017923497a173815c47cdb6f9852efd5bcb5 (diff) | |
| parent | 5b4d431d2367fe5db8725efca5494f957b7a8b76 (diff) | |
Merge pull request #4724 from satheeshkarra/pim_fixes
pimd: NH Updates are missing at PIM during boot up
| -rw-r--r-- | pimd/pim_neighbor.c | 5 | ||||
| -rw-r--r-- | pimd/pim_nht.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index a63b09fc1f..722ecb2a72 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -424,10 +424,11 @@ struct pim_neighbor *pim_neighbor_find_by_secondary(struct interface *ifp, struct pim_neighbor *neigh; struct prefix *p; - pim_ifp = ifp->info; - if (!pim_ifp) + if (!ifp || !ifp->info) return NULL; + pim_ifp = ifp->info; + for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) { for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, pnode, p)) { if (prefix_same(p, src)) diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 65ea858cb6..39dc8ad2fa 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -842,6 +842,14 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS) } if (!ifp->info) { + /* + * Though Multicast is not enabled on this + * Interface store it in database otheriwse we + * may miss this update and this will not cause + * any issue, because while choosing the path we + * are ommitting the Interfaces which are not + * multicast enabled + */ if (PIM_DEBUG_PIM_NHT) { char buf[NEXTHOP_STRLEN]; @@ -853,8 +861,6 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS) nexthop2str(nexthop, buf, sizeof(buf))); } - nexthop_free(nexthop); - continue; } if (nhlist_tail) { |
