Bug 75781
Summary: | [PATCH]ipsec output packet in plaintext when re-routing in ip6_route_me_harder, | ||
---|---|---|---|
Product: | Networking | Reporter: | Hui Zhang (nickcave.zhang) |
Component: | IPV6 | Assignee: | Hideaki YOSHIFUJI (yoshfuji) |
Status: | NEW --- | ||
Severity: | normal | CC: | alan |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | any | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Hui Zhang
2014-05-09 00:51:10 UTC
I found the root cause is IP6CB(skb)->nhoff not be set in this case,the below patch could resolve the problem. diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 98a262b..1d86b2d 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -64,7 +64,7 @@ int __ip6_local_out(struct sk_buff *skb) if (len > IPV6_MAXPLEN) len = 0; ipv6_hdr(skb)->payload_len = htons(len); - + IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, skb_dst(skb)->dev, dst_output); } Please send patches to netdev@vger.kernel.org (See Documentation/SubmittingPatches) thanks. |