Fix UDP checksum handling in clinat.c#1038
Conversation
|
patch for #1037 |
|
|
||
| if (h->u.udp.check == 0) | ||
| { | ||
| h->u.udp.check = 0xFFFF; |
There was a problem hiding this comment.
You quoted the RFC saying: "NAT implementations rewriting IP addresses must either leave checksum=0 unchanged or fully recompute the checksum from scratch."
Why setting it to 0xFFFF?
There was a problem hiding this comment.
that's the check after it's been re-adjusted / recomputed. if it happens to be 0 it should be sent as FFFF
There was a problem hiding this comment.
do you have a reference about this rule that we could add as a comment here?
I was looking up the RFC, but I couldn't find anything about checksum=0.
There was a problem hiding this comment.
https://www.rfc-editor.org/rfc/rfc768.html page 2
and explained here https://people.na.infn.it/~garufi/didattica/CorsoAcq/Trasp/Lezione9/tcpip_ill/udp_user.htm section 11.3
There was a problem hiding this comment.
Yeah, my bad. For whatever reason I mixed up your patch with another change and got off-track.
|
I added a comment to your patch. However, please ensure to write a proper commit message and add a Signed-off-by line, as explained in our |
|
Since you don't want to send the patch to the mailing list, may I know how you wanna be credited (name + email) so I can prepare and send a patch for you? Thanks! |
thank you, it is fine by me to leave it annonymous. |
ok, thank you for the fix! I'll have to sign the patch in any case, because it's required in order to accept the license and get the code merged. I'll close this issue once the patch is in. |
|
patch is on gerrit: https://gerrit.openvpn.net/c/openvpn/+/1681 |
#1037
Thank you for your contribution
You are welcome to open PR, but they are used for discussion only. All
patches must eventually go to the openvpn-devel mailing list for review:
Please send your patch using git-send-email. For example to send your latest commit to the list:
For details, see these Wiki articles: