summaryrefslogtreecommitdiffstats
path: root/src/plugins/dhcp/dhcp6_proxy_node.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-10-30 14:46:40 +0100
committerDamjan Marion <dmarion@me.com>2019-10-31 22:46:58 +0000
commit60ad1a59a39872d0eff8ed0961fd81c5854c968b (patch)
treec5eb0d710ed09b85815d771042dcff77d27fe803 /src/plugins/dhcp/dhcp6_proxy_node.c
parent4354317bf3592d81fcafd94e33b320c3e49f45d3 (diff)
dhcp: fix proxy dhcpv6 size check
Type: fix Change-Id: Ibbb25bc530fdeaa3083c9b833a286a5d40e93c1e Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/dhcp/dhcp6_proxy_node.c')
-rw-r--r--src/plugins/dhcp/dhcp6_proxy_node.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/dhcp/dhcp6_proxy_node.c b/src/plugins/dhcp/dhcp6_proxy_node.c
index 929b49e2b41..272c379b6a3 100644
--- a/src/plugins/dhcp/dhcp6_proxy_node.c
+++ b/src/plugins/dhcp/dhcp6_proxy_node.c
@@ -315,8 +315,9 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm,
link_address_set:
- if ((b0->current_length + sizeof (*id1) + sizeof (*vss1) +
- sizeof (*cmac)) > vlib_buffer_get_default_data_size (vm))
+ if ((b0->current_data + b0->current_length + sizeof (*id1) +
+ sizeof (*vss1) + sizeof (*cmac)) >
+ vlib_buffer_get_default_data_size (vm))
{
error0 = DHCPV6_PROXY_ERROR_PKT_TOO_BIG;
next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP;