summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorDavid Hotham <david.hotham@metaswitch.com>2016-09-20 13:34:00 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-27 22:28:07 +0000
commit62f88d881306a1f628e3a25d3e3b00b8acf7ec5e (patch)
tree0afaf737b7dfb9bcaf601c94a71e80bc032fc738 /vnet
parent99492de7199e973783bc615c01b28114462d74db (diff)
arp: handle ARP proxy after tunnelling
Only rewind the buffer back to the start of the ethernet header, rather than all the way. We don't want to undo earlier decapsulation. Change-Id: I5f4b183eb3e8df690695ce3a97e55f3b0579a266 Signed-off-by: David Hotham <david.hotham@metaswitch.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/ethernet/arp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vnet/vnet/ethernet/arp.c b/vnet/vnet/ethernet/arp.c
index d08764a329f..541355f9f89 100644
--- a/vnet/vnet/ethernet/arp.c
+++ b/vnet/vnet/ethernet/arp.c
@@ -1088,12 +1088,13 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
/*
* Rewind buffer, direct code above not to
* think too hard about it.
- * $$$ is the answer ever anything other than
- * vlib_buffer_reset(..)?
*/
if_addr0 = &proxy_src;
is_unnum0 = 0;
- vlib_buffer_reset (p0);
+ i32 ethernet_start =
+ vnet_buffer (p0)->ethernet.start_of_ethernet_header;
+ i32 rewind = p0->current_data - ethernet_start;
+ vlib_buffer_advance (p0, -rewind);
n_proxy_arp_replies_sent++;
goto send_reply;
}