netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sctp: IPsec rules are ineffective with ipv6
@ 2010-01-27 14:12 Nicolas Dichtel
  2010-01-28 13:51 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Dichtel @ 2010-01-27 14:12 UTC (permalink / raw)
  To: netdev, Vlad Yasevich, linux-sctp

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

xfrm_lookup() is missing in sctp_v6_xmit(), add it.

Signed-off-by: Junwei Zhang <junwei.zhang@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

[-- Attachment #2: x.diff --]
[-- Type: text/x-diff, Size: 708 bytes --]

diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index cc50fbe..f24e23c 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -197,8 +197,10 @@ out:
 static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport)
 {
 	struct sock *sk = skb->sk;
+	struct dst_entry *dst = skb_dst(skb);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct flowi fl;
+	int err;
 
 	memset(&fl, 0, sizeof(fl));
 
@@ -231,6 +233,9 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport)
 	if (!(transport->param_flags & SPP_PMTUD_ENABLE))
 		skb->local_df = 1;
 
+	if ((err = xfrm_lookup(sock_net(sk), &dst, &fl, sk, 0)) < 0)
+		return err;
+
 	return ip6_xmit(sk, skb, &fl, np->opt, 0);
 }
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-29  2:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27 14:12 [PATCH] sctp: IPsec rules are ineffective with ipv6 Nicolas Dichtel
2010-01-28 13:51 ` David Miller
2010-01-28 15:24   ` Vlad Yasevich
2010-01-28 15:41     ` Nicolas Dichtel
2010-01-28 16:36       ` Vlad Yasevich
2010-01-28 18:25         ` Nicolas Dichtel
2010-01-29  2:03           ` Wei Yongjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).