blob: f63a70a3cd72ea1b6d1a9fd3e9c5c1ca6e77d78c [file] [log] [blame]
Neale Rannsad422ed2016-11-02 14:20:04 +00001diff --git a/scapy/contrib/mpls.py b/scapy/contrib/mpls.py
2index 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
Neale Ranns71275e32017-05-25 12:38:58 -070014@@ -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)