From: Hongjun Ni Date: Mon, 8 Jan 2018 22:52:19 +0000 (+0800) Subject: VPP-1119: PPPoE's destination MAC was overwritten X-Git-Tag: v18.04-rc1~471 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=929fb9d75071ef4141b1cac3997f86d9ded0a9ab;p=vpp.git VPP-1119: PPPoE's destination MAC was overwritten Change-Id: I6ae99c00e76058654f2c5e71377e9fd1bd13b47b Signed-off-by: Hongjun Ni (cherry picked from commit c287cd550b91be7a93bae76d0086db87f575e3d3) --- diff --git a/src/plugins/pppoe/pppoe.c b/src/plugins/pppoe/pppoe.c index 499b1d7147f..fac29c781fa 100644 --- a/src/plugins/pppoe/pppoe.c +++ b/src/plugins/pppoe/pppoe.c @@ -150,10 +150,11 @@ pppoe_fixup (vlib_main_t * vm, ip_adjacency_t * adj, vlib_buffer_t * b0) { pppoe_header_t *pppoe0; - pppoe0 = vlib_buffer_get_current (b0); + pppoe0 = vlib_buffer_get_current (b0) + sizeof (ethernet_header_t); pppoe0->length = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0) - sizeof (pppoe_header_t) + + sizeof (pppoe0->ppp_proto) - sizeof (ethernet_header_t)); }