Skip to content
Snippets Groups Projects
Commit cc02b632 authored by Neale Ranns's avatar Neale Ranns Committed by Guillaume Valadon
Browse files

MPLS label layering/stacking clears the EOS bit


Signed-off-by: default avatarNeale Ranns <nranns@cisco.com>
parent 94df5760
No related branches found
No related tags found
No related merge requests found
......@@ -41,3 +41,4 @@ class MPLS(Packet):
bind_layers(Ether, MPLS, type=0x8847)
bind_layers(GRE, MPLS, proto=0x8847)
bind_layers(MPLS, MPLS, s=0)
......@@ -8492,3 +8492,20 @@ class Test(Packet):
pkt = Test(str(Test(Values=[0, 0, 0, 0, 1, 1, 1, 1])))
assert(pkt.BitCount == 8)
assert(pkt.ByteCount == 1)
############
############
+ MPLS tests
= MPLS - build/dissection
from scapy.contrib.mpls import MPLS
p1 = MPLS()/IP()/UDP()
assert(p1[MPLS].s == 1)
p2 = MPLS()/MPLS()/IP()/UDP()
assert(p2[MPLS].s == 0)
p1[MPLS]
p1[IP]
p2[MPLS]
p2[MPLS:1]
p2[IP]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment