From 107e7d4b5375295e94e01653e3cf064ea6647064 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 11 Apr 2017 09:55:19 -0700 Subject: Remove usued, redundant and deprecated code from lookup.h Change-Id: Ic16bc10d0b2877b2afdf052615f9334f31b9519f Signed-off-by: Neale Ranns --- src/vnet/ethernet/arp.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/vnet/ethernet/arp.c') diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c index dd509193..3e292e4d 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 = ðernet_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", -- cgit 1.2.3-korg