Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPLS implementation #99

Open
juanan95mh opened this issue Feb 18, 2020 · 0 comments
Open

MPLS implementation #99

juanan95mh opened this issue Feb 18, 2020 · 0 comments

Comments

@juanan95mh
Copy link

juanan95mh commented Feb 18, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant