blob: 5c819110ddc6b53f5f4e7fda4c23a7bc1649d413 [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