public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Francois-Xavier Le Bail <fx.lebail@yahoo•com>, netdev@vger•kernel.org
Cc: "David S. Miller" <davem@davemloft•net>,
	Alexey Kuznetsov <kuznet@ms2•inr.ac.ru>,
	James Morris <jmorris@namei•org>,
	Hideaki Yoshifuji <yoshfuji@linux-ipv6•org>,
	Patrick McHardy <kaber@trash•net>
Subject: Re: [PATCH] IPv6: add option to use Subnet-Router anycast addresses as source addresses
Date: Thu, 02 Jan 2014 19:16:33 +0400	[thread overview]
Message-ID: <52C582D1.8040107@cogentembedded.com> (raw)
In-Reply-To: <1388656263-6795-1-git-send-email-fx.lebail@yahoo.com>

Hello.

On 02-01-2014 13:51, Francois-Xavier Le Bail wrote:

> This change allows to follow a recommandation of RFC4942.

> - Add "enable_anycast_src" sysctl to control the use of Subnet-Router anycast
>    addresses as source addresses. This sysctl is false by default to preserve
>    existing behavior.
> - Use it in ip6_datagram_send_ctl() and icmpv6_echo_reply().

> Reference:
> RFC4942 - IPv6 Transition/Coexistence Security Considerations
>     (http://tools.ietf.org/html/rfc4942#section-2.1.6)

> 2.1.6. Anycast Traffic Identification and Security
>
>     [...]
>     To avoid exposing knowledge about the internal structure of the
>     network, it is recommended that anycast servers now take advantage of
>     the ability to return responses with the anycast address as the
>     source address if possible.

> Signed-off-by: Francois-Xavier Le Bail <fx.lebail@yahoo•com>
> ---
[...]
> diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
> index 6983058..c7d6392 100644
> --- a/net/ipv6/datagram.c
> +++ b/net/ipv6/datagram.c
> @@ -668,6 +668,9 @@ int ip6_datagram_send_ctl(struct net *net, struct sock *sk,
>   			if (addr_type != IPV6_ADDR_ANY) {
>   				int strict = __ipv6_addr_src_scope(addr_type) <= IPV6_ADDR_SCOPE_LINKLOCAL;
>   				if (!(inet_sk(sk)->freebind || inet_sk(sk)->transparent) &&
> +					!(net->ipv6.enable_anycast_src &&
> +					  ipv6_chk_acast_addr(net, NULL,
> +						&src_info->ipi6_addr)) &&

    The continuation line should start right under 'net' on the previous line.

WBR, Sergei

  reply	other threads:[~2014-01-02 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02  9:51 [PATCH] IPv6: add option to use Subnet-Router anycast addresses as source addresses Francois-Xavier Le Bail
2014-01-02 15:16 ` Sergei Shtylyov [this message]
2014-01-02 15:34   ` François-Xavier Le Bail

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=52C582D1.8040107@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded$(echo .)com \
    --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