antrea-io / libOpenflow

OpenFlow Go library
Apache License 2.0
9 stars 18 forks source link

Bugfix: incorrect calculation on IP packet header length #38

Closed wenyingd closed 1 year ago

wenyingd commented 1 year ago

This change is to resolve this issue: the header option length in an IP packet header is not counted.

There are at least 20 bytes in the IP packet header. Hence, if the IHL value is less than 5, 5 is used to count IP header length, otherwise it should use the IHL value directly.

ceclinux commented 1 year ago

I think the title should be "Bugfix: incorrect calculation on IP packet header length". You should fix the commit message as well.

tnqn commented 1 year ago

Could you merge https://github.com/antrea-io/libOpenflow/pull/39 first before this one so we can use the new tag?

ceclinux commented 1 year ago

LGTM

wenyingd commented 1 year ago

Could you merge #39 first before this one so we can use the new tag?

Done.