[PATCH] IPv6 packet size field doesn't include header size, take this into account

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 at gmail.com>
---
 oncp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oncp.c b/oncp.c
index b0f6d12..3c7cfa1 100644
--- a/oncp.c
+++ b/oncp.c
@@ -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:
-- 
2.9.3




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux