public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion•org>
To: "François-Xavier Le Bail" <fx.lebail@yahoo•com>
Cc: David Miller <davem@davemloft•net>,
	netdev@vger•kernel.org, kuznet@ms2•inr.ac.ru, jmorris@namei•org,
	yoshfuji@linux-ipv6•org, kaber@trash•net
Subject: Re: [PATCH net-next v4] IPv6: use anycast addresses as source addresses in echo reply
Date: Tue, 7 Jan 2014 00:05:08 +0100	[thread overview]
Message-ID: <20140106230508.GD10204@order.stressinduktion.org> (raw)
In-Reply-To: <1389045229.42277.YahooMailBasic@web125505.mail.ne1.yahoo.com>

On Mon, Jan 06, 2014 at 01:53:49PM -0800, François-Xavier Le Bail wrote:
> On Mon, 1/6/14, David Miller <davem@davemloft•net> wrote:
> 
> > From: Hannes Frederic Sowa <hannes@stressinduktion•org>
> > Date: Mon, 6 Jan 2014 00:05:05 +0100
> 
> >> On Fri, Jan 03, 2014 at 05:43:31PM +0100, Francois-Xavier Le Bail wrote:
> >>> diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
> >>> index 5d42009..65c8619 100644
> >>> --- a/net/ipv6/icmp.c
> >>> +++ b/net/ipv6/icmp.c
> >>> @@ -556,7 +556,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
> >>>  
> >>>      saddr = &ipv6_hdr(skb)->daddr;
> >>>  
> >>> -    if (!ipv6_unicast_destination(skb))
> >>> +    if (!ipv6_unicast_destination(skb) &&
> >>> +        !(net->ipv6.anycast_src_echo_reply &&
> >>> +          ipv6_chk_acast_addr(net, NULL, saddr)))
> >>>          saddr = NULL;
> >> 
> >> I am not sure why you left out the device at ipv6_chk_acast_addr?
> >> 
> >> IMHO this logic is a bit more complex, we can pass NULL for ipv6 addresses of
> >> scope global but need to check the interface for scope link.
> >> 
> >> It is already possible via setsockopt JOIN_ANYCAST that an ll address is
> >> anycast on another interface which may not be checked here.
> 
> > I think we should pass a valid device in unless it breaks something
> > obvious.
> 
> The problem is that "saddr" is not necessarily an address on "skb->dev"
> in icmpv6_echo_reply(). It may be an address on another interface.

Maybe you're right, but then I don't get it. Could you make an example?

Thanks,

  Hannes

  reply	other threads:[~2014-01-06 23:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 21:53 [PATCH net-next v4] IPv6: use anycast addresses as source addresses in echo reply François-Xavier Le Bail
2014-01-06 23:05 ` Hannes Frederic Sowa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-01-07 12:38 François-Xavier Le Bail
2014-01-07 13:09 ` Hannes Frederic Sowa
2014-01-07 12:38 François-Xavier Le Bail
2014-01-07 13:01 ` Hannes Frederic Sowa
2014-01-07 14:03   ` François-Xavier Le Bail
2014-01-03 16:43 Francois-Xavier Le Bail
2014-01-05 23:05 ` Hannes Frederic Sowa
2014-01-06 10:41   ` François-Xavier Le Bail
2014-01-06 10:56     ` Hannes Frederic Sowa
2014-01-06 13:48       ` François-Xavier Le Bail
2014-01-06 15:52         ` Hannes Frederic Sowa
2014-01-06 20:11   ` David Miller

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=20140106230508.GD10204@order.stressinduktion.org \
    --to=hannes@stressinduktion$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=fx.lebail@yahoo$(echo .)com \
    --cc=jmorris@namei$(echo .)org \
    --cc=kaber@trash$(echo .)net \
    --cc=kuznet@ms2$(echo .)inr.ac.ru \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=yoshfuji@linux-ipv6$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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