Commit eefed76
xfrm: policy: fix layer 4 flowi decoding
The commit shipped with two bugs:
fl4->fl4_icmp_type = flkeys->icmp.type;
fl4->fl4_icmp_type = flkeys->icmp.code;
~~~~ should have been "code".
But the more severe bug is that I got fooled by flowi member defines:
fl4_icmp_type, fl4_gre_key and fl4_dport share the same union/address.
Fix typo and make gre/icmp key setting depend on the l4 protocol.
Fixes: 7a02070 ("xfrm: policy: replace session decode with flow dissector")
Reported-and-tested-by: Antony Antony <antony@phenome.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>1 parent 53a5b4f commit eefed76
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3400 | 3400 | | |
3401 | 3401 | | |
3402 | 3402 | | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
3403 | 3413 | | |
3404 | 3414 | | |
3405 | | - | |
3406 | | - | |
3407 | | - | |
3408 | 3415 | | |
3409 | 3416 | | |
3410 | 3417 | | |
| |||
3427 | 3434 | | |
3428 | 3435 | | |
3429 | 3436 | | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
3430 | 3447 | | |
3431 | | - | |
3432 | | - | |
3433 | | - | |
3434 | 3448 | | |
3435 | 3449 | | |
3436 | 3450 | | |
| |||
0 commit comments