summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-10-30 14:46:40 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-07 21:45:43 +0000
commit2c4ba41bea6d89ade80d67241eaf135e4b55de19 (patch)
tree06305bccc9c31dbad1bda5c27dcdd9928a7b92ca /src
parent818b5bcdf11d8a3e4fadc6484b11438d5e615777 (diff)
dhcp: fix proxy dhcpv6 size check
Type: fix Change-Id: Ibbb25bc530fdeaa3083c9b833a286a5d40e93c1e Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 60ad1a59a39872d0eff8ed0961fd81c5854c968b)
Diffstat (limited to 'src')
-rw-r--r--src/vnet/dhcp/dhcp6_proxy_node.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/dhcp/dhcp6_proxy_node.c b/src/vnet/dhcp/dhcp6_proxy_node.c
index 6006f0e23c5..3de3121d3e0 100644
--- a/src/vnet/dhcp/dhcp6_proxy_node.c
+++ b/src/vnet/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;