Neale Ranns | ad422ed | 2016-11-02 14:20:04 +0000 | [diff] [blame] | 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 |