From 809daf3b371e0c2457b5d4bd414382eb67bf8348 Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Iniesta Date: Tue, 2 Sep 2014 12:20:00 +0200 Subject: Imported Upstream version 2.3.4 --- src/openvpn/proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/openvpn/proto.c') diff --git a/src/openvpn/proto.c b/src/openvpn/proto.c index b437f1a..7b58e6a 100644 --- a/src/openvpn/proto.c +++ b/src/openvpn/proto.c @@ -60,7 +60,7 @@ is_ipv_X ( int tunnel_type, struct buffer *buf, int ip_ver ) + sizeof (struct openvpn_iphdr))) return false; eh = (const struct openvpn_ethhdr *) BPTR (buf); - if (ntohs (eh->proto) != OPENVPN_ETH_P_IPV4) + if (ntohs (eh->proto) != (ip_ver == 6 ? OPENVPN_ETH_P_IPV6 : OPENVPN_ETH_P_IPV4)) return false; offset = sizeof (struct openvpn_ethhdr); } -- cgit v1.2.3