-
Notifications
You must be signed in to change notification settings - Fork 28
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
Zero checksum handling for UDP4->UDP6 #44
Conversation
WARNING: modpost: nat46.o(.data+0x30): Section mismatch in reference from the variable nat46_netops to the function .init.text:nat46_ns_init() The variable nat46_netops references the function __init nat46_ns_init() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
MAP should be transparent to the UDP csum zero in both directions.
Was a zero UDP checksum standardized in IPv6 for all applications ? If yes - would you happen to have some references? The closest I can find it https://www.rfc-editor.org/rfc/rfc6936, and it’s merely a discussion; That was my motivation in not handling it with equivalence - but if you could confirm that in practice that was a wrong idea, I am happy to merge this change. |
My change comes out because of referring to the CERNET MAP implementation. And in it UDP csum zero is retained. Thanks. |
Ok, fair enough, thanks for the info. I guess should be no harm merging - if someone complains we can revisit this later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is what CERNET implementation did, let’s merge this.
I'm all for this as we're seeing real world user impact without it, and we have it in the UDP6->UDP4 direction already (with the config flag set). RFC 8200 does codify an exception for UDP-based tunnelling protocols. Maybe if we squint enough we can pretend it's applicable here?
Thanks @angus19 |
Cool, if we see a real world impact without the change, makes sense to have merged it. Thanks a lot @angus19 ! |
@ayourtch @r-pats A defect is observed when loading the module with zero_csum_pass=0. |
Well setting zero_csum_pass to 1 is not much of a fix, is it - it rather masks the problem in the code. Also it is a change of defaults, which i would be a bit hesitant to do… Here’s an idea, what if we rewrite that bit as follows: if (!udp->check) { so, if it’s UDP and the checksum is zero and we don’t pass the zero checksum, recalculate it ? It will still be broken if we don’t have full payload since we can’t do the full calculation in this case, but should take care of other cases ? what do you think ? |
LGTM.
We may reassemble fragmented UDPs to have a full payload first before recalculating the checksum. |
Cool. Let’s do step by step. Reassembly is a much larger thing and a much smaller hopefully corner case, i am not fully sure on the benefit vs complexity and fragility it brings. I am away from computer now, only with phone - will either push the patch with this change in a few days, or you can push it and I merge it. |
I do not expect every incoming UDP fragment goes into reassembling process under zero_csum_pass=0. |
Hmm, we seem to have the same issue at L1006-L1015 (nat46-core.c). |
MAP should be transparent to the UDP csum zero in both directions.