mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
xfrm: fix xfrm by MARK logic
While using xfrm by MARK feature in 2.6.34 - 2.6.35 kernels, the mark is always cleared in flowi structure via memset in _decode_session4 (net/ipv4/xfrm4_policy.c), so the policy lookup fails. IPv6 code is affected by this bug too. Signed-off-by: Peter Kosyh <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
8bd39456bd
commit
44b451f163
2 changed files with 4 additions and 0 deletions
|
|
@ -124,6 +124,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||
u8 nexthdr = nh[IP6CB(skb)->nhoff];
|
||||
|
||||
memset(fl, 0, sizeof(struct flowi));
|
||||
fl->mark = skb->mark;
|
||||
|
||||
ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr);
|
||||
ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue