aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-05-29 13:58:43 +0000
committerDamjan Marion <dmarion@me.com>2019-06-03 14:15:37 +0000
commit57e53bb9a5c9ee164938a1cee6025f7044deb728 (patch)
tree2a2515bdfc796f6427b0fc45139f9b8f8f90880a /src/vnet/ip/ip_api.c
parentdd2423ef74b37711aec413603df21230f7823333 (diff)
ARP: add feature arc
- arp-input, registered with the ethernet protocol dispatcher, performs basic checks and starts the arc - arp-reply; first feature on the arc replies to requests and learns from responses (no functional change) - arp-proxy; checks against the proxy DB arp-reply and arp-proxy are enabled when the interface is appropriately configured. Change-Id: I7d1bbabdb8c8b8187cac75e663daa4a5a7ce382a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r--src/vnet/ip/ip_api.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index f4e5d1776bd..06caf111b91 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -3019,22 +3019,18 @@ vl_api_proxy_arp_dump_t_handler (vl_api_proxy_arp_dump_t * mp)
}
static walk_rc_t
-send_proxy_arp_intfc_details (vnet_main_t * vnm,
- vnet_sw_interface_t * si, void *data)
+send_proxy_arp_intfc_details (u32 sw_if_index, void *data)
{
vl_api_proxy_arp_intfc_details_t *mp;
proxy_arp_walk_ctx_t *ctx;
- if (!(si->flags & VNET_SW_INTERFACE_FLAG_PROXY_ARP))
- return (WALK_CONTINUE);
-
ctx = data;
mp = vl_msg_api_alloc (sizeof (*mp));
clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_PROXY_ARP_INTFC_DETAILS);
mp->context = ctx->context;
- mp->sw_if_index = htonl (si->sw_if_index);
+ mp->sw_if_index = htonl (sw_if_index);
vl_api_send_msg (ctx->reg, (u8 *) mp);
@@ -3055,8 +3051,7 @@ vl_api_proxy_arp_intfc_dump_t_handler (vl_api_proxy_arp_intfc_dump_t * mp)
.context = mp->context,
};
- vnet_sw_interface_walk (vnet_get_main (),
- send_proxy_arp_intfc_details, &wctx);
+ proxy_arp_intfc_walk (send_proxy_arp_intfc_details, &wctx);
}
static void
@@ -3069,15 +3064,9 @@ static void
VALIDATE_SW_IF_INDEX (mp);
- vnet_sw_interface_t *si =
- vnet_get_sw_interface (vnm, ntohl (mp->sw_if_index));
-
- ASSERT (si);
-
- if (mp->enable_disable)
- si->flags |= VNET_SW_INTERFACE_FLAG_PROXY_ARP;
- else
- si->flags &= ~VNET_SW_INTERFACE_FLAG_PROXY_ARP;
+ rv = vnet_proxy_arp_enable_disable (vnm,
+ ntohl (mp->sw_if_index),
+ mp->enable_disable);
BAD_SW_IF_INDEX_LABEL;