Commit 3d47fa4
datapath: Ensure correct L4 checksum with NAT helpers.
Setting the CHECKSUM_PARTIAL flag before sending to helper mods was
missing the checksum update call ('csum_*_magic()'), which caused
checksum failures with kernels <4.6. This can mean that the L4
checksum is incorrect when the packet egresses the system.
Rather than adding the missing (IP version dependent) calls, give the
packet a temp skb_dst with RTCF_LOCAL flag not set, which ensures the
skb is properly changed to CHECKSUM_PARTIAL if required and the
modified packet will get the correct checksum when fully processed.
This has tested with FTP NAT helpers on kernel version 3.13.
Signed-off-by: John Hurley <john.hurley@netronome.com>
Acked-by: Jarno Rajahalme <jarno@ovn.org>1 parent 0f6a066 commit 3d47fa4
1 file changed
Lines changed: 17 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
| |||
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
362 | 363 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
386 | 368 | | |
387 | 369 | | |
388 | 370 | | |
389 | 371 | | |
390 | 372 | | |
391 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
392 | 379 | | |
393 | 380 | | |
394 | 381 | | |
| |||
0 commit comments