diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-10 21:45:28 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-15 15:26:53 +0100 |
commit | 7e2b760345f2dc43d9fc5381617ac4acc1cfd1d1 (patch) | |
tree | 7bd585227cb8666a15d3920ca13a1f44560b6360 /nhrpd | |
parent | Merge pull request #270 from donaldsharp/cares (diff) | |
download | frr-7e2b760345f2dc43d9fc5381617ac4acc1cfd1d1.tar.xz frr-7e2b760345f2dc43d9fc5381617ac4acc1cfd1d1.zip |
*: Remove non-vrf based ifindex lookup
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'nhrpd')
-rw-r--r-- | nhrpd/netlink_arp.c | 4 | ||||
-rw-r--r-- | nhrpd/nhrp_interface.c | 2 | ||||
-rw-r--r-- | nhrpd/nhrp_packet.c | 2 | ||||
-rw-r--r-- | nhrpd/nhrp_route.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c index a418ecabd..76419a7ff 100644 --- a/nhrpd/netlink_arp.c +++ b/nhrpd/netlink_arp.c @@ -75,7 +75,7 @@ static void netlink_neigh_msg(struct nlmsghdr *msg, struct zbuf *zb) } } - ifp = if_lookup_by_index(ndm->ndm_ifindex); + ifp = if_lookup_by_index(ndm->ndm_ifindex, VRF_DEFAULT); if (!ifp || sockunion_family(&addr) == AF_UNSPEC) return; @@ -185,7 +185,7 @@ static void netlink_log_indication(struct nlmsghdr *msg, struct zbuf *zb) if (!pkthdr || !in_ndx || !zbuf_used(&pktpl)) return; - ifp = if_lookup_by_index(htonl(*in_ndx)); + ifp = if_lookup_by_index(htonl(*in_ndx), VRF_DEFAULT); if (!ifp) return; diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index 4ac612d3a..052b9c1e8 100644 --- a/nhrpd/nhrp_interface.c +++ b/nhrpd/nhrp_interface.c @@ -127,7 +127,7 @@ static void nhrp_interface_update_nbma(struct interface *ifp) if (saddr.s_addr) sockunion_set(&nbma, AF_INET, (u_char *) &saddr.s_addr, sizeof(saddr.s_addr)); else if (!nbmaifp && nifp->linkidx != IFINDEX_INTERNAL) - nbmaifp = if_lookup_by_index(nifp->linkidx); + nbmaifp = if_lookup_by_index(nifp->linkidx, VRF_DEFAULT); } break; default: diff --git a/nhrpd/nhrp_packet.c b/nhrpd/nhrp_packet.c index 5d2866a67..36dbdfd77 100644 --- a/nhrpd/nhrp_packet.c +++ b/nhrpd/nhrp_packet.c @@ -290,7 +290,7 @@ static int nhrp_packet_recvraw(struct thread *t) goto err; } - ifp = if_lookup_by_index(ifindex); + ifp = if_lookup_by_index(ifindex, VRF_DEFAULT); if (!ifp) goto err; p = nhrp_peer_get(ifp, &remote_nbma); diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c index 8d066eeae..69c55e305 100644 --- a/nhrpd/nhrp_route.c +++ b/nhrpd/nhrp_route.c @@ -198,7 +198,7 @@ int nhrp_route_read(int cmd, struct zclient *zclient, zebra_size_t length, vrf_i for (i = 0; i < ifindex_num; i++) { ifindex = stream_getl(s); if (i == 0 && ifindex != IFINDEX_INTERNAL) - ifp = if_lookup_by_index(ifindex); + ifp = if_lookup_by_index(ifindex, VRF_DEFAULT); } } if (CHECK_FLAG(message, ZAPI_MESSAGE_DISTANCE)) |