xfrm6: fix the proto and ports decode of sctp protocol
authorWei Yongjun <yjwei@cn.fujitsu.com>
Thu, 2 Jul 2009 16:59:49 +0000 (16:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jul 2009 02:10:10 +0000 (19:10 -0700)
commit59cae0092e4da753b5a2adb32933e0d1b223bcc5
treeb2578c0452504d63de9aeaf5029daae5cefef165
parentc615c9f3f3cea60279b1bb38e8ef27bd575ecd0c
xfrm6: fix the proto and ports decode of sctp protocol

The SCTP pushed the skb above the sctp chunk header, so the
check of pskb_may_pull(skb, nh + offset + 1 - skb->data) in
_decode_session6() will never return 0 and the ports decode
of sctp will always fail. (nh + offset + 1 - skb->data < 0)

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/xfrm6_policy.c