diff options
author | liangrq <liangrq@efly.cc> | 2022-07-04 16:23:21 +0800 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-07-28 08:13:48 +0000 |
commit | 4a817a5d7eb248434987e1c99c23a5dfcf6c7f56 (patch) | |
tree | 3527906cb71b03f9b37ab5db2740f80c0ef734cb /src | |
parent | a5266c6bb508253c2a64719b093eb09f3e14ed9a (diff) |
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 <liangrq@efly.cc>
Change-Id: Ic40a5a47a52c8187aaf6c6854df761529e6f24d9
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/ip6-nd/ip6_ra.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |