Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IPv6 packet size field doesn't include header size, take this into ac…
…count

IPv6 packet's 'length' field contains length of payload excluding headers.
Header's length (40) needs to be added to that to get complete packet length.
This patch seems to be fixing random VPN drops.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
mar-kolya authored and dwmw2 committed Dec 13, 2016
1 parent 881eb28 commit 575ae53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oncp.c
Expand Up @@ -1002,7 +1002,7 @@ int oncp_mainloop(struct openconnect_info *vpninfo, int *timeout)
iplen = load_be16(vpninfo->cstp_pkt->data + 2);
break;
case 6:
iplen = load_be16(vpninfo->cstp_pkt->data + 4);
iplen = load_be16(vpninfo->cstp_pkt->data + 4) + 40;
break;
default:
badiplen:
Expand Down

0 comments on commit 575ae53

Please sign in to comment.