You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are errors at MPLS implementation, mosty related to packet/header sizes. I have made a fork with the corrections.
MAIN ERRORS:
-When zodiac POP a label suposes that the new payload have a (Packet Size - 16)bytes size, but the new payload is (Packet Size - ethHdr(14) - MPLS(4) )bytes, so the correct size is (Packet Size - 18) bytes
-Pushing a label the code move the payload pointer to the next byte to first MPLS header and this is an error, the payload had to stay next to the ethernet header. So if we push another label, it will be placed between ETHERNET hdr and 1st MPLS label(the correct way).
-The same error with pointer but decrementing it at POP
-When you move the old payload and leave space to a new MPLS label you have to move payload size, and payload size is = PacketSize-14(eth hdr size)
so: memmove(fields.payload + 4, fields.payload, packet_size - 14);
and not: memmove(fields.payload + 4, fields.payload, packet_size - 12);
There are errors at MPLS implementation, mosty related to packet/header sizes. I have made a fork with the corrections.
MAIN ERRORS:
-When zodiac POP a label suposes that the new payload have a (Packet Size - 16)bytes size, but the new payload is (Packet Size - ethHdr(14) - MPLS(4) )bytes, so the correct size is (Packet Size - 18) bytes
-Pushing a label the code move the payload pointer to the next byte to first MPLS header and this is an error, the payload had to stay next to the ethernet header. So if we push another label, it will be placed between ETHERNET hdr and 1st MPLS label(the correct way).
-The same error with pointer but decrementing it at POP
-When you move the old payload and leave space to a new MPLS label you have to move payload size, and payload size is = PacketSize-14(eth hdr size)
so:
memmove(fields.payload + 4, fields.payload, packet_size - 14);
and not:
memmove(fields.payload + 4, fields.payload, packet_size - 12);
Greetings.
Fork URL -> https://github.com/juanan95mh/ZodiacFX
The text was updated successfully, but these errors were encountered: