facebookincubator / katran

A high performance layer 4 load balancer
GNU General Public License v2.0
4.75k stars 504 forks source link

Make parse_tcp() validate ICMPv4 packet's size properly #159

Closed sm815lee closed 1 year ago

sm815lee commented 2 years ago

This commit fix a bug that Katran cannot deal with 'Destination unreachable' ICMPv4 packet due to wrong validation of packet size in parse_tcp() Some ICMPv4 packets, for example, "ICMP Fragmentation Needed And DF Set", only contains IP header + first 8 bytes of TCP header as a payload. ( https://www.ietf.org/rfc/rfc1191.txt ) But it checked whether there is intact TCP header in ICMPv4 payload. This issue made some connections halt from time to time until clients find better routes without MTU issue. It is somewhat similar to the link below: https://blog.cloudflare.com/path-mtu-discovery-in-practice/

facebook-github-bot commented 2 years ago

Hi @sm815lee!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

facebook-github-bot commented 2 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot commented 2 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

avasylev commented 1 year ago

Quite old PR, please create new one if you still want changes merged.

sm815lee commented 1 year ago

Sure, I am going to see whether this issue is still there in the latest