[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1174944899.17953.20.camel@localhost.localdomain>
Date: Mon, 26 Mar 2007 17:34:59 -0400
From: Eric Paris <eparis@...hat.com>
To: Joy Latten <latten@...tin.ibm.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
herbert@...dor.apana.org.au, jmorris@...ei.org, paul.moore@...com,
vyekkirala@...stedcs.com
Subject: Re: [PATCH]: SAD sometimes has double SAs.
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
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists