netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Joy Latten <latten@austin.ibm.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	herbert@gondor.apana.org.au, jmorris@namei.org,
	paul.moore@hp.com, vyekkirala@trustedcs.com
Subject: Re: [PATCH]: SAD sometimes has double SAs.
Date: Mon, 26 Mar 2007 17:34:59 -0400	[thread overview]
Message-ID: <1174944899.17953.20.camel@localhost.localdomain> (raw)
In-Reply-To: <200703232258.l2NMwKqH016994@faith.austin.ibm.com>

On Fri, 2007-03-23 at 16:58 -0600, Joy Latten wrote:

> @@ -710,11 +713,20 @@ static struct xfrm_state *__find_acq_cor
>  
>  		switch (family) {
>  		case AF_INET:
> +			if (x->id.daddr.a4 == saddr->a4 &&
> +			    x->props.saddr.a4 == daddr->a4)
> +				track_opposite = 1;
>  			if (x->id.daddr.a4    != daddr->a4 ||
>  			    x->props.saddr.a4 != saddr->a4)
>  				continue;
>  			break;
>  		case AF_INET6:
> +			if (ipv6_addr_equal((struct in6_addr *)x->id.daddr.a6,
> +					     (struct in6_addr *)saddr) ||
> +			    ipv6_addr_equal((struct in6_addr *)
> +					     x->props.saddr.a6,
> +					     (struct in6_addr *)daddr))
> +					track_opposite = 1;
>  			if (!ipv6_addr_equal((struct in6_addr *)x->id.daddr.a6,
>  					     (struct in6_addr *)daddr) ||
>  			    !ipv6_addr_equal((struct in6_addr *)

I'm not at all able to speak on the correctness or validity of the
solution, but shouldn't the ipv6 case be a && not an || like the ipv4
case?  Isn't this going to match all sorts of things?  Did you test this
patch on ipv6 and see it to solve your problem?

I'm also not enjoying the formatting in the ipv6 part where the first
time you have the cast on the same time as the object but not the second
part where x->props.saddr.a6 is on its own little line.

-Eric


  parent reply	other threads:[~2007-03-26 21:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 22:58 [PATCH]: SAD sometimes has double SAs Joy Latten
2007-03-23 23:27 ` David Miller
2007-03-26 21:34 ` Eric Paris [this message]
2007-03-26 21:48   ` David Miller
2007-03-27  1:04     ` Joy Latten
2007-03-28 15:15       ` Joy Latten
2007-03-28 16:20         ` LSPP kernels (was Re: [PATCH]: SAD sometimes has double SAs) James Morris
2007-03-28 16:36           ` Paul Moore
2007-03-28 19:12             ` David Miller
2007-03-28 16:49           ` Eric Paris
2007-03-28 17:11             ` James Morris
2007-03-28 19:13         ` [PATCH]: SAD sometimes has double SAs David Miller
2007-03-26 23:25   ` Joy Latten

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=1174944899.17953.20.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmorris@namei.org \
    --cc=latten@austin.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.moore@hp.com \
    --cc=vyekkirala@trustedcs.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).