aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.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/tcp/tcp.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/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index b6884f56fd5..b7929300fe4 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -25,6 +25,7 @@
#include <vnet/dpo/receive_dpo.h>
#include <vnet/ip/ip6_neighbor.h>
#include <math.h>
+#include <vnet/ethernet/arp.h>
tcp_main_t tcp_main;
@@ -1654,14 +1655,10 @@ tcp_configure_v4_source_address_range (vlib_main_t * vm,
vnet_main_t *vnm = vnet_get_main ();
u32 start_host_byte_order, end_host_byte_order;
fib_prefix_t prefix;
- vnet_sw_interface_t *si;
fib_node_index_t fei;
u32 fib_index = 0;
u32 sw_if_index;
int rv;
- int vnet_proxy_arp_add_del (ip4_address_t * lo_addr,
- ip4_address_t * hi_addr, u32 fib_index,
- int is_del);
clib_memset (&prefix, 0, sizeof (prefix));
@@ -1690,16 +1687,17 @@ tcp_configure_v4_source_address_range (vlib_main_t * vm,
sw_if_index = fib_entry_get_resolving_interface (fei);
- /* Enable proxy arp on the interface */
- si = vnet_get_sw_interface (vnm, sw_if_index);
- si->flags |= VNET_SW_INTERFACE_FLAG_PROXY_ARP;
-
/* Configure proxy arp across the range */
rv = vnet_proxy_arp_add_del (start, end, fib_index, 0 /* is_del */ );
if (rv)
return rv;
+ rv = vnet_proxy_arp_enable_disable (vnm, sw_if_index, 1);
+
+ if (rv)
+ return rv;
+
do
{
dpo_id_t dpo = DPO_INVALID;