summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2018-01-09 06:52:19 +0800
committerDave Wallace <dwallacelf@gmail.com>2018-01-18 15:07:59 +0000
commit929fb9d75071ef4141b1cac3997f86d9ded0a9ab (patch)
treea9e6f89c6385f4451136a15512cb013d6b430115 /src
parent504a71f2d7b5ee1d9069e5fc2357de564cb35b5a (diff)
VPP-1119: PPPoE's destination MAC was overwritten
Change-Id: I6ae99c00e76058654f2c5e71377e9fd1bd13b47b Signed-off-by: Hongjun Ni <hongjun.ni@intel.com> (cherry picked from commit c287cd550b91be7a93bae76d0086db87f575e3d3)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/pppoe/pppoe.c3
1 files changed, 2 insertions, 1 deletions
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));
}