diff options
Diffstat (limited to 'vnet/vnet/dhcpv6/proxy_node.c')
-rw-r--r-- | vnet/vnet/dhcpv6/proxy_node.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vnet/vnet/dhcpv6/proxy_node.c b/vnet/vnet/dhcpv6/proxy_node.c index 01f5965c1b4..4dc746f6936 100644 --- a/vnet/vnet/dhcpv6/proxy_node.c +++ b/vnet/vnet/dhcpv6/proxy_node.c @@ -201,8 +201,7 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, b0 = vlib_get_buffer (vm, bi0); h0 = vlib_buffer_get_current (b0); - e_h0 = (ethernet_header_t *)b0->data; - clib_memcpy(client_src_mac, e_h0->src_address, 6); + /* Send to DHCPV6 server via the configured FIB */ vnet_buffer(b0)->sw_if_index[VLIB_TX] = dpm->server_fib_index; @@ -212,6 +211,9 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, */ u0 = (void *)h0 -(sizeof(*u0)); ip0 = (void *)u0 -(sizeof(*ip0)); + e_h0 = (void *)ip0 - ethernet_buffer_header_size(b0); + + clib_memcpy(client_src_mac, e_h0->src_address, 6); switch (h0->u.msg_type) { case DHCPV6_MSG_SOLICIT: |