/* 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;
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)
/* 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,
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);
/* 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)
/* 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));
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;
}
/* 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;
{
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!",