diff options
-rw-r--r-- | lib/if.c | 8 | ||||
-rw-r--r-- | lib/if.h | 7 | ||||
-rw-r--r-- | ospfd/ospf_packet.c | 2 | ||||
-rw-r--r-- | ripd/ripd.c | 8 |
4 files changed, 9 insertions, 16 deletions
@@ -373,7 +373,7 @@ if_lookup_exact_address (void *src, int family, vrf_id_t vrf_id) /* Lookup interface by IPv4 address. */ struct connected * -if_lookup_address_vrf (void *matchaddr, int family, vrf_id_t vrf_id) +if_lookup_address (void *matchaddr, int family, vrf_id_t vrf_id) { struct listnode *node; struct prefix addr; @@ -414,12 +414,6 @@ if_lookup_address_vrf (void *matchaddr, int family, vrf_id_t vrf_id) return match; } -struct connected * -if_lookup_address (void *matchaddr, int family) -{ - return if_lookup_address_vrf (matchaddr, family, VRF_DEFAULT); -} - /* Lookup interface by prefix */ struct interface * if_lookup_prefix_vrf (struct prefix *prefix, vrf_id_t vrf_id) @@ -389,7 +389,6 @@ struct nbr_connected /* Prototypes. */ extern int if_cmp_name_func (char *, char *); -extern struct connected *if_lookup_address (void *matchaddr, int family); extern struct interface *if_lookup_prefix (struct prefix *prefix); extern void if_update_vrf (struct interface *, const char *name, int namelen, @@ -398,9 +397,9 @@ extern struct interface *if_create (const char *name, int namelen, vrf_id_t vrf_id); extern struct interface *if_lookup_by_index (ifindex_t, vrf_id_t vrf_id); extern struct interface *if_lookup_exact_address (void *matchaddr, int family, - vrf_id_t vrf_id); -extern struct connected *if_lookup_address_vrf (void *matchaddr, int family, - vrf_id_t vrf_id); + vrf_id_t vrf_id); +extern struct connected *if_lookup_address (void *matchaddr, int family, + vrf_id_t vrf_id); extern struct interface *if_lookup_prefix_vrf (struct prefix *prefix, vrf_id_t vrf_id); diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index d09e0f7d8..b7721adb3 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -2789,7 +2789,7 @@ ospf_read (struct thread *thread) /* Handle cases where the platform does not support retrieving the ifindex, and also platforms (such as Solaris 8) that claim to support ifindex retrieval but do not. */ - c = if_lookup_address ((void *)&iph->ip_src, AF_INET); + c = if_lookup_address ((void *)&iph->ip_src, AF_INET, VRF_DEFAULT); if (c) ifp = c->ifp; if (ifp == NULL) diff --git a/ripd/ripd.c b/ripd/ripd.c index e0f96f9aa..abc2faf2e 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1129,7 +1129,7 @@ rip_response_process (struct rip_packet *packet, int size, /* The datagram's IPv4 source address should be checked to see whether the datagram is from a valid neighbor; the source of the datagram must be on a directly connected network (RFC2453 - Sec. 3.9.2) */ - if (if_lookup_address((void *)&from->sin_addr, AF_INET) == NULL) + if (if_lookup_address((void *)&from->sin_addr, AF_INET, VRF_DEFAULT) == NULL) { zlog_info ("This datagram doesn't came from a valid neighbor: %s", inet_ntoa (from->sin_addr)); @@ -1215,7 +1215,7 @@ rip_response_process (struct rip_packet *packet, int size, continue; } - if (! if_lookup_address ((void *)&rte->nexthop, AF_INET)) + if (! if_lookup_address ((void *)&rte->nexthop, AF_INET, VRF_DEFAULT)) { struct route_node *rn; struct rip_info *rinfo; @@ -1816,7 +1816,7 @@ rip_read (struct thread *t) } /* Which interface is this packet comes from. */ - ifc = if_lookup_address ((void *)&from.sin_addr, AF_INET); + ifc = if_lookup_address ((void *)&from.sin_addr, AF_INET, VRF_DEFAULT); if (ifc) ifp = ifc->ifp; @@ -2517,7 +2517,7 @@ rip_update_process (int route_type) { p = &rp->p; - connected = if_lookup_address (&p->u.prefix4, AF_INET); + connected = if_lookup_address (&p->u.prefix4, AF_INET, VRF_DEFAULT); if (! connected) { zlog_warn ("Neighbor %s doesnt have connected interface!", |