From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Fran=E7ois-Xavier_Le_Bail?= Subject: Re: [PATCH net-next v2] ipv6: enable anycast addresses as source addresses in ICMPv6 error messages Date: Fri, 7 Feb 2014 02:04:57 -0800 (PST) Message-ID: <1391767497.41194.YahooMailNeo@web125504.mail.ne1.yahoo.com> References: <1390147236-3660-1-git-send-email-fx.lebail@yahoo.com> <52F357C3.9060406@6wind.com> <1391690329.62545.YahooMailNeo@web125506.mail.ne1.yahoo.com> <52F395BB.2030209@6wind.com> <1391697041.6325.YahooMailNeo@web125505.mail.ne1.yahoo.com> <52F4A869.6090401@6wind.com> Reply-To: =?iso-8859-1?Q?Fran=E7ois-Xavier_Le_Bail?= Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: David Stevens , Bill Fink , Hannes Frederic Sowa , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki Yoshifuji , Patrick McHardy To: "nicolas.dichtel@6wind.com" , "netdev@vger.kernel.org" Return-path: Received: from nm32.bullet.mail.ne1.yahoo.com ([98.138.229.25]:41645 "EHLO nm32.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbaBGKHp convert rfc822-to-8bit (ORCPT ); Fri, 7 Feb 2014 05:07:45 -0500 In-Reply-To: <52F4A869.6090401@6wind.com> Sender: netdev-owner@vger.kernel.org List-ID: > From: Nicolas Dichtel > To: Fran=E7ois-Xavier Le Bail ; "netdev@vger.ker= nel.org" > Cc: David Stevens ; Bill Fink ; Hannes Frederic Sowa ; David S. M= iller ; Alexey Kuznetsov ; J= ames Morris ; Hideaki Yoshifuji ; Patrick McHardy > Sent: Friday, February 7, 2014 10:33 AM > Subject: Re: [PATCH net-next v2] ipv6: enable anycast addresses as so= urce addresses in ICMPv6 error messages >=20 > Le 06/02/2014 15:30, Fran=E7ois-Xavier Le Bail a =E9crit : >=20 >>> From: Nicolas Dichtel >>=20 >>> To: Fran=E7ois-Xavier Le Bail ;=20 > "netdev@vger.kernel.org" >>> Cc: David Stevens ; Bill Fink=20 > ; Hannes Frederic Sowa=20 > ; David S. Miller ;=20 > Alexey Kuznetsov ; James Morris=20 > ; Hideaki Yoshifuji ;=20 > Patrick McHardy >>> Sent: Thursday, February 6, 2014 3:01 PM >>> Subject: Re: [PATCH net-next v2] ipv6: enable anycast addresses as= =20 > source addresses in ICMPv6 error messages >>>=20 >>> Le 06/02/2014 13:38, Fran=E7ois-Xavier Le Bail a =E9crit : >>>>> =A0 From: Nicolas Dichtel >>>>=20 >>>>=20 >>>>> =A0 Subject: Re: [PATCH net-next v2] ipv6: enable anycast=20 > addresses as >>> source addresses in ICMPv6 error messages >>>>>=20 >>>>> =A0 Le 19/01/2014 17:00, Francois-Xavier Le Bail a =E9crit : >>>>>=20 >>>>>> =A0 =A0 - Uses ipv6_anycast_destination() in icmp6_send(). >>>>>>=20 >>>>>> =A0 =A0 Suggested-by: Bill Fink >>>>>> =A0 =A0 Signed-off-by: Francois-Xavier Le Bail >>> >>>>> =A0 This patch causes an Oops on my target. >>>>=20 >>>> =A0 What is your target ? >>> x86 32bits >>>=20 >>>>=20 >>>>> =A0 Here is the step to reproduce it: >>>>> =A0 modprobe sit >>>>> =A0 ip link add sit1 type sit remote 10.16.0.121 local=20 > 10.16.0.249 >>>>> =A0 ip l s sit1 up >>>>> =A0 ip -6 a a dev sit1 2001:1234::123 remote 2001:1234::121 >>>>> =A0 ping6 2001:1234::121 >>>>=20 >>>> =A0 I cannot reproduce this in my target (updated net-next x86_64= )=20 > and >>>> =A0 iproute2 from git. >>> I use linus tree (3.14-rc1+). >>>=20 >>>> =A0 Can you send me your config file ? >>> See attachment. >>>=20 >>>=20 >>>>=20 >>>>> =A0 The problem is that ipv6_anycast_destination() uses=20 > unconditionally >>>>> =A0 skb_dst(skb), which is NULL in this case. >>>>>=20 >>>>> =A0 Not sure what is the best way to fix this, any suggestions? >>>>=20 >>>> =A0 I will try to reproduce first and see. >>> Note that the peer was not set up, hence the ping didn't work. >>> ipip6_err() calls ipip6_err_gen_icmpv6_unreach() which will drop t= he=20 > dst >>> before calling icmpv6_send(). >>>=20 >>>=20 >>> Here is the backtrace: >>> [=A0 387.786155] BUG: unable to handle kernel NULL pointer derefer= ence at=20 > 00000096 >>> [=A0 387.787291] IP: [] icmp6_send+0x79/0x596 >>=20 >> [...] >>=20 >>> [=A0 387.790055]=A0 [] ? tunnel64_err+0x16/0x25 [tunnel4= ] >>=20 >> Thanks for these informations. >>=20 >> Can you test an alternative replacing: >>=20 >> test on: ipv6_anycast_destination(skb) >> by >> test on: ipv6_chk_acast_addr_src(net, skb->dev, &hdr->daddr) > It's ok with this function. Do you submit the corresponding patch? Yes, thanks you for the report and the tests.