From: Nicolas Dichtel <nicolas.dichtel@dev.6wind.com>
To: netdev <netdev@vger.kernel.org>,
Vlad Yasevich <vladislav.yasevich@hp.com>,
linux-sctp@vger.kernel.org
Subject: [PATCH] sctp: IPsec rules are ineffective with ipv6
Date: Wed, 27 Jan 2010 15:12:59 +0100 [thread overview]
Message-ID: <4B6049EB.8030803@dev.6wind.com> (raw)
[-- 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);
}
next reply other threads:[~2010-01-27 14:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 14:12 Nicolas Dichtel [this message]
2010-01-28 13:51 ` [PATCH] sctp: IPsec rules are ineffective with ipv6 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6049EB.8030803@dev.6wind.com \
--to=nicolas.dichtel@dev.6wind.com \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vladislav.yasevich@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).