Restructure code slightly to save ip_tos bits earlier.
Fix the bug where the ip_tos field is zeroed out before
assigning to the iptos variable. Restore the ip_tos
and ip_ver fields only if they have been zeroed during
the pseudo-header checksum calculation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
But take my approval with a huge grain of salt. I don't have any experience in our TCP stack.
Comment Actions
Just a random comment...
sys/netinet/tcp_input.c | ||
---|---|---|
678 ↗ | (On Diff #20751) | I know we have these splattered all over the tree about 15 times; I keep wondering if I want a macro with a sensible name such as IPV6_GET_TC() or something so that people looking at the code will understand that we get the traffic class there... Maybe in a separate commit to fix them all... |
sys/netinet/tcp_input.c | ||
---|---|---|
678 ↗ | (On Diff #20751) | For what it's worth, I count a total of 8 instances of this |
head/sys/netinet/tcp_input.c | ||
---|---|---|
726 | Can you please explain why this line changed? |
head/sys/netinet/tcp_input.c | ||
---|---|---|
726 | Look up 5 lines. len == tlen + off0. |
head/sys/netinet/tcp_input.c | ||
---|---|---|
726 | I was avoiding doing the same calculation twice. |