From 03f254bf6424098cea56ba24cd5b8099c66a5823 Mon Sep 17 00:00:00 2001 From: Robert Gomulka <r.gom1977@gmail.com> Date: Mon, 8 Jun 2015 12:07:53 +0200 Subject: [PATCH] Fix for missing socket.IPPROTO_IPIP In bug report https://bitbucket.org/secdev/scapy/issue/5119 it is stated that Solaris has no IPPROTO_IPIP. The same holds true on windows platform. Add (monkey patch) missing attribute. Reference: http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers --HG-- branch : missing_ipip --- scapy/layers/inet6.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py index 28978fe4..6233e21d 100644 --- a/scapy/layers/inet6.py +++ b/scapy/layers/inet6.py @@ -30,6 +30,9 @@ if not socket.has_ipv6: if not hasattr(socket, "IPPROTO_IPV6"): # Workaround for http://bugs.python.org/issue6926 socket.IPPROTO_IPV6 = 41 +if not hasattr(socket, "IPPROTO_IPIP"): + # Workaround for https://bitbucket.org/secdev/scapy/issue/5119 + socket.IPPROTO_IPIP = 4 from scapy.config import conf from scapy.layers.l2 import * -- GitLab