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

IPv6Packet UpdateCalculatedValues doesn't work #141

Open
trudyhood opened this issue Sep 22, 2021 · 1 comment
Open

IPv6Packet UpdateCalculatedValues doesn't work #141

trudyhood opened this issue Sep 22, 2021 · 1 comment

Comments

@trudyhood
Copy link

IPv6 TotalLength & PayloadLength & aren't calculated properly. I looked at code and saw UpdateCalculatedValues was not overrided by IPv6Packet.

var buffer = new byte[100];
var packetv6 = new IPv6Packet(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback) 
          { Protocol = PacketDotNet.ProtocolType.Gre };
packetv6.PayloadData = buffer;
packetv6.UpdateCalculatedValues();

packetv6.TotalLength is expected 140 but it is 40
packetv6.PayloadLength is expected 100 but it is 0

@PhyxionNL
Copy link
Collaborator

The PayloadLength must be set manually after changing payload right now, but I think this behavior can be slightly improved.

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

No branches or pull requests

2 participants