netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@redhat.com>,
	netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net
Subject: Re: [XFRM] Allow transport SAs even when there is no policy
Date: Tue, 19 Oct 2004 16:16:02 +0200	[thread overview]
Message-ID: <417521A2.4010500@trash.net> (raw)
In-Reply-To: <20041018214326.GA6589@gondor.apana.org.au>

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

Herbert Xu wrote:

>What I meant to say is all packets with tunnel mode SAs should be
>rejected since we don't allow optional tunnel transforms for security
>reasons.
>
>This patch fixes it.
>
Looks good. So you agree we should also apply my patch to
xfrm_policy_lookup (attached again with less confusing subject) ? It makes
packets with a secpath fall through to __xfrm_policy_check when the policy
list is empty, so the default policy is always the same. This will break
setups with keying daemons that don't add forward policies for tunnel mode
SAs.

Regards
Patrick


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 941 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/10/19 16:04:44+02:00 kaber@coreworks.de 
#   [XFRM]: Apply policy checks to packets with a secpath when the policy list is empty
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# include/net/xfrm.h
#   2004/10/19 16:04:18+02:00 kaber@coreworks.de +1 -1
#   [XFRM]: Apply policy checks to packets with a secpath when the policy list is empty
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
--- a/include/net/xfrm.h	2004-10-19 16:05:39 +02:00
+++ b/include/net/xfrm.h	2004-10-19 16:05:39 +02:00
@@ -601,7 +601,7 @@
 	if (sk && sk->sk_policy[XFRM_POLICY_IN])
 		return __xfrm_policy_check(sk, dir, skb, family);
 		
-	return	!xfrm_policy_list[dir] ||
+	return	(!xfrm_policy_list[dir] && !skb->sp) ||
 		(skb->dst->flags & DST_NOPOLICY) ||
 		__xfrm_policy_check(sk, dir, skb, family);
 }

  reply	other threads:[~2004-10-19 14:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-17 15:48 [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward Patrick McHardy
2004-10-17 21:23 ` Herbert Xu
2004-10-17 22:26   ` Patrick McHardy
2004-10-17 22:42     ` Patrick McHardy
2004-10-17 23:12     ` Herbert Xu
2004-10-18 20:34       ` Patrick McHardy
2004-10-18 21:43         ` [XFRM] Allow transport SAs even when there is no policy Herbert Xu
2004-10-19 14:16           ` Patrick McHardy [this message]
2004-10-19 21:25             ` Herbert Xu
2004-10-21  5:04               ` David S. Miller
2004-10-21  5:02           ` David S. Miller
2004-10-19 15:31       ` [Ipsec-tools-devel] Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward Aidas Kasparas
2004-10-19 15:38         ` Patrick McHardy
2004-10-19 15:57           ` Aidas Kasparas
2004-10-19 21:26         ` Herbert Xu

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=417521A2.4010500@trash.net \
    --to=kaber@trash.net \
    --cc=davem@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ipsec-tools-devel@lists.sourceforge.net \
    --cc=netdev@oss.sgi.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).