All of lore.kernel.org
 help / color / mirror / Atom feed
* problem when a ipsec output packet re-routing in ip6_route_me_harder
@ 2014-05-08  5:24 nickcave
  0 siblings, 0 replies; only message in thread
From: nickcave @ 2014-05-08  5:24 UTC (permalink / raw)
  To: netdev

Hi All:

I found in some case a packet match IPSEC rule will be send out in plaintext.

If a output ipv6 packet match a ipsec rule and the dst be set to
xfrm_output correct,
 but there is a netfilter mangle table rule also matched the rule
which set the mark value to 0x01 ,
and then ,in ip6t_mangle_out ,when ip6t_do_table finished, the mark
value changed, and the packet
need routing by ip6_route_me_harder , the packet will be decode by

 ip6_route_me_harder—>xfrm_decode_session->_decode_session6  the
function get nexthdr from cb , I found the cb only be set when it's a
incoming packet, so in this case , I got a error nexthdr  value. It's
caused the xfrm_lookup failure,and the packet be sendout in plaintext.
    u8 nexthdr = nh[IP6CB(skb)->nhoff]; //in my case, the nexthdr is always 96

I think it a kernel bug.Did anyone met the same issue?

Best Regards
Hui Zhang

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-08  5:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08  5:24 problem when a ipsec output packet re-routing in ip6_route_me_harder nickcave

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.