From 3e329a537d271a6fef875609512e39c88a37dab6 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 18 Jul 2018 22:37:54 +0200 Subject: [PATCH] Correct the packet length calculation with IPv6 --- server/process_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/process_packet.c b/server/process_packet.c index 0b1cf03d..962766d3 100644 --- a/server/process_packet.c +++ b/server/process_packet.c @@ -308,7 +308,7 @@ process_packet_ipv6(fko_srv_options_t * opts, const unsigned char * packet, * frame (such as a 4-byte Ethernet Frame Check Sequence) to not * interfere with SPA operations. */ - pkt_end = ((unsigned char*)iph_p)+ntohs(iph_p->ip6_plen); + pkt_end = ((unsigned char*)(iph_p + 1))+ntohs(iph_p->ip6_plen); if(pkt_end > fr_end) return;