[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1404984410.12704.3.camel@localhost>
Date: Thu, 10 Jul 2014 11:26:50 +0200
From: Hannes Frederic Sowa <hannes@...hat.com>
To: roy.qing.li@...il.com
Cc: netdev@...r.kernel.org, greearb@...delatech.com
Subject: Re: [RFC][PATCH] ipv6: fix the check when handle RA
Hi,
On Do, 2014-07-10 at 16:29 +0800, roy.qing.li@...il.com wrote:
> From: Li RongQing <roy.qing.li@...il.com>
>
> d9333196572(ipv6: Allow accepting RA from local IP addresses.) made
> ndisc_router_discovery to skip to handle RA when accept_ra_from_local
> is 0 and saddr of packet is not the device address, in fact, this
> condition should be handled
>
> Fixes: d9333196572(ipv6: Allow accepting RA from local IP addresses.)
> Cc: Ben Greear <greearb@...delatech.com>
> Signed-off-by: Li RongQing <roy.qing.li@...il.com>
> net/ipv6/ndisc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index a845e3d..e70e805 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -1152,8 +1152,8 @@ static void ndisc_router_discovery(struct sk_buff *skb)
> * accept_ra_from_local is set to true.
> */
> if (!(in6_dev->cnf.accept_ra_from_local ||
> - ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
> - NULL, 0))) {
> + !ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
> + NULL, 0))) {
Uh!
Instead of double negotiation can you please write
if (!in6_dev->cnf.accept_ra_from_local &&
ipv6_chk_addr(...)) {
printk(...);
goto skip;
}
Thanks for fixing this, good catch!
Thanks,
Hannes
--
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