aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet/arp.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-04-11 09:55:19 -0700
committerFlorin Coras <florin.coras@gmail.com>2017-04-11 19:20:38 +0000
commit107e7d4b5375295e94e01653e3cf064ea6647064 (patch)
tree7bdda8f00b5e29a70436b70bb005dc5c907c837d /src/vnet/ethernet/arp.c
parent3a7956383420a1d2f5f28b5bd3d3b3f5dda0420d (diff)
Remove usued, redundant and deprecated code from lookup.h
Change-Id: Ic16bc10d0b2877b2afdf052615f9334f31b9519f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ethernet/arp.c')
-rw-r--r--src/vnet/ethernet/arp.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index dd509193386..3e292e4df93 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -1915,18 +1915,15 @@ vnet_proxy_arp_add_del (ip4_address_t * lo_addr,
int
vnet_proxy_arp_fib_reset (u32 fib_id)
{
- ip4_main_t *im = &ip4_main;
ethernet_arp_main_t *am = &ethernet_arp_main;
ethernet_proxy_arp_t *pa;
u32 *entries_to_delete = 0;
u32 fib_index;
- uword *p;
int i;
- p = hash_get (im->fib_index_by_table_id, fib_id);
- if (!p)
+ fib_index = fib_table_find (FIB_PROTOCOL_IP4, fib_id);
+ if (~0 == fib_index)
return VNET_API_ERROR_NO_SUCH_ENTRY;
- fib_index = p[0];
vec_foreach (pa, am->proxy_arps)
{
@@ -1985,11 +1982,10 @@ ip_arp_add_del_command_fn (vlib_main_t * vm,
else if (unformat (input, "fib-id %d", &fib_id))
{
- ip4_main_t *im = &ip4_main;
- uword *p = hash_get (im->fib_index_by_table_id, fib_id);
- if (!p)
+ fib_index = fib_table_find (FIB_PROTOCOL_IP4, fib_id);
+
+ if (~0 == fib_index)
return clib_error_return (0, "fib ID %d doesn't exist\n", fib_id);
- fib_index = p[0];
}
else if (unformat (input, "proxy %U - %U",