diff --git a/scapy/arch/windows/__init__.py b/scapy/arch/windows/__init__.py index 8ebbf3880ebda29cc89d354282d7adcfe2e5a4ff..a3585e0e616d40d75d5cc1d2e20613bf43882695 100755 --- a/scapy/arch/windows/__init__.py +++ b/scapy/arch/windows/__init__.py @@ -33,6 +33,8 @@ if not hasattr(socket, 'IPPROTO_AH'): socket.IPPROTO_AH=51 if not hasattr(socket, 'IPPROTO_ESP'): socket.IPPROTO_ESP=50 +if not hasattr(socket, 'IPPROTO_GRE'): + socket.IPPROTO_GRE=47 from scapy.arch import pcapdnet from scapy.arch.pcapdnet import * diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py index c605825757db17b72ad6506ff13db40c964908bc..1fa08c6c63758a2c342c604dcabb3541c095fd4c 100644 --- a/scapy/layers/inet6.py +++ b/scapy/layers/inet6.py @@ -3861,6 +3861,7 @@ conf.l2types.register(31, IPv6) bind_layers(Ether, IPv6, type = 0x86dd ) bind_layers(CookedLinux, IPv6, proto = 0x86dd ) +bind_layers(GRE, IPv6, proto = 0x86dd ) bind_layers(Loopback, IPv6, type = 0x1c ) bind_layers(IPerror6, TCPerror, nh = socket.IPPROTO_TCP ) bind_layers(IPerror6, UDPerror, nh = socket.IPPROTO_UDP ) @@ -3869,3 +3870,4 @@ bind_layers(IPv6, UDP, nh = socket.IPPROTO_UDP ) bind_layers(IP, IPv6, proto = socket.IPPROTO_IPV6 ) bind_layers(IPv6, IPv6, nh = socket.IPPROTO_IPV6 ) bind_layers(IPv6, IP, nh = socket.IPPROTO_IPIP ) +bind_layers(IPv6, GRE, nh = socket.IPPROTO_GRE ) diff --git a/scapy/layers/l2.py b/scapy/layers/l2.py index 252d8a22c49092693b8bce794a75e47db7873fa0..9b3292d0e869fec8ce3957e6e584d969d4c8f526 100644 --- a/scapy/layers/l2.py +++ b/scapy/layers/l2.py @@ -1107,7 +1107,7 @@ bind_layers( CookedLinux, EAPOL, proto=34958) bind_layers( GRE, LLC, proto=122) bind_layers( GRE, Dot1Q, proto=33024) bind_layers( GRE, Dot1AD, type=0x88a8) -bind_layers( GRE, Ether, proto=1) +bind_layers( GRE, Ether, proto=0x6558) bind_layers( GRE, ARP, proto=2054) bind_layers( GRE, EAPOL, proto=34958) bind_layers( GRE, GRErouting, { "routing_present" : 1 } )