net: ipv6: Fixed up ipsec packet be re-routing issue
authorhuizhang <huizhang@marvell.com>
Mon, 9 Jun 2014 04:37:25 +0000 (12:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 07:47:31 +0000 (00:47 -0700)
commitf6c20c596f41fe6331cee2053b270bf12142b04e
tree8465b77d7c1b2e08a012e7a772a839593a7f7280
parent5ce54af1fc9d2718d46c9fd92a161379fb197266
net: ipv6: Fixed up ipsec packet be re-routing issue

Bug report on https://bugzilla.kernel.org/show_bug.cgi?id=75781

When a local output ipsec packet match the mangle table rule,
and be set mark value, the packet will be route again in
route_me_harder -> _session_decoder6

In this case, the nhoff in CB of skb was still the default
value 0. So the protocal match can't success and the packet can't match
correct SA rule,and then the packet be send out in plaintext.

To fixed up the issue. The CB->nhoff must be set.

Signed-off-by: Hui Zhang <huizhang@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/output_core.c