MPLS hash function improvements
[vpp.git] / test / patches / scapy-2.3.3 / mpls.py.patch
1 diff --git a/scapy/contrib/mpls.py b/scapy/contrib/mpls.py
2 index 640a0c5..6af1d4a 100644
3 --- a/scapy/contrib/mpls.py
4 +++ b/scapy/contrib/mpls.py
5 @@ -18,6 +18,8 @@ class MPLS(Packet):
6  
7     def guess_payload_class(self, payload):
8         if len(payload) >= 1:
9 +           if not self.s:
10 +              return MPLS
11             ip_version = (ord(payload[0]) >> 4) & 0xF
12             if ip_version == 4:
13                 return IP
14 @@ -27,3 +29,4 @@ class MPLS(Packet):
15  
16  bind_layers(Ether, MPLS, type=0x8847)
17  bind_layers(GRE, MPLS, proto=0x8847)
18 +bind_layers(MPLS, MPLS, s=0)