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 /ospfd | |
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 'ospfd')
-rw-r--r-- | ospfd/ospf_packet.c | 3 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index a0cc367cd..d09e0f7d8 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -35,6 +35,7 @@ #include "sockopt.h" #include "checksum.h" #include "md5.h" +#include "vrf.h" #include "ospfd/ospfd.h" #include "ospfd/ospf_network.h" @@ -2218,7 +2219,7 @@ ospf_recv_packet (int fd, struct interface **ifp, struct stream *ibuf) ifindex = getsockopt_ifindex (AF_INET, &msgh); - *ifp = if_lookup_by_index (ifindex); + *ifp = if_lookup_by_index (ifindex, VRF_DEFAULT); if (ret != ip_len) { diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index ce4bc9dfa..33fc0bf52 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -7948,7 +7948,7 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt) if (or->type == OSPF_DESTINATION_NETWORK) for (ALL_LIST_ELEMENTS (or->paths, pnode, pnnode, path)) { - if (if_lookup_by_index(path->ifindex)) + if (if_lookup_by_index(path->ifindex, VRF_DEFAULT)) { if (path->nexthop.s_addr == 0) vty_out (vty, "%24s directly attached to %s%s", @@ -7998,7 +7998,7 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs) for (ALL_LIST_ELEMENTS_RO (or->paths, pnode, path)) { - if (if_lookup_by_index(path->ifindex)) + if (if_lookup_by_index(path->ifindex, VRF_DEFAULT)) { if (path->nexthop.s_addr == 0) vty_out (vty, "%24s directly attached to %s%s", @@ -8047,7 +8047,7 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt) for (ALL_LIST_ELEMENTS (er->paths, pnode, pnnode, path)) { - if (if_lookup_by_index(path->ifindex)) + if (if_lookup_by_index(path->ifindex, VRF_DEFAULT)) { if (path->nexthop.s_addr == 0) vty_out (vty, "%24s directly attached to %s%s", |