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>
/*
* Rewind buffer, direct code above not to
* think too hard about it.
/*
* 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;
*/
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;
}
n_proxy_arp_replies_sent++;
goto send_reply;
}