From 4a817a5d7eb248434987e1c99c23a5dfcf6c7f56 Mon Sep 17 00:00:00 2001 From: liangrq Date: Mon, 4 Jul 2022 16:23:21 +0800 Subject: ip6-nd: copy mac address to wrong buffer current_data Type: fix Receive router solicitation in pop vlan interface, it will cause copy mac address to wrong buffer current_data and can not reply the solicitation right Signed-off-by: liangrq Change-Id: Ic40a5a47a52c8187aaf6c6854df761529e6f24d9 --- src/vnet/ip6-nd/ip6_ra.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c index 2985ac44be2..788984eeedb 100644 --- a/src/vnet/ip6-nd/ip6_ra.c +++ b/src/vnet/ip6-nd/ip6_ra.c @@ -637,6 +637,8 @@ icmp6_router_solicitation (vlib_main_t * vm, /* Reuse current MAC header, copy SMAC to DMAC and * interface MAC to SMAC */ vlib_buffer_reset (p0); + vlib_buffer_advance ( + p0, vnet_buffer (p0)->l2_hdr_offset); eth0 = vlib_buffer_get_current (p0); clib_memcpy (eth0->dst_address, eth0->src_address, 6); -- cgit 1.2.3-korg