netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Andrew Yourtchenko <ayourtch@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ipv6: fixup RTF_* flags when restoring RTPROT_RA route from rtnetlink
Date: Fri, 19 Aug 2016 21:07:25 +0300	[thread overview]
Message-ID: <689653c8-bc05-705c-04d6-ff7570b28dd0@cogentembedded.com> (raw)
In-Reply-To: <55219c8da12705fefa36ee5853b899ee88f730fb.1471622715.git.ayourtch@gmail.com>

Hello.

On 08/19/2016 07:41 PM, Andrew Yourtchenko wrote:

> Fix the flags for RA-derived routes that were saved
> via "ip -6 route save" and and subsequently restored via
> "ip -6 route restore", allowing the incoming router advertisements
> to update them, rather than complain about inability to do so.
>
> Upon the restore of RA-derived saved routes, set the RTF_ADDRCONF
> to indicate that the source of the route was originally
> a router advertisement, and set the RTF_DEFAULT or RTF_ROUTEINFO
> flag depending on prefix length. This can be considered a
> sister change of f0396f60d7c165018c9b203fb9b89fb224835578, in

    It's enough to specify 12 digits but you also need to specify the commit 
summary enclosed in ("").

> the other direction.
>
> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
> ---
> Changes since v1 [1]:
>  * fixed the indentation of the basic blocks to be always a full TAB
>    as per David Miller's review
>
> [1] v1: http://marc.info/?l=linux-netdev&m=147135599322285&w=2
>
>  net/ipv6/route.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index f5b987d..60d95cd 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -2769,6 +2769,16 @@ static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
>  	cfg->fc_protocol = rtm->rtm_protocol;
>  	cfg->fc_type = rtm->rtm_type;
>
> +	if (rtm->rtm_protocol == RTPROT_RA) {
> +		/* RA-derived route: set flags accordingly. */
> +		cfg->fc_flags |= RTF_ADDRCONF;
> +		if (rtm->rtm_dst_len == 0) {
> +			cfg->fc_flags |= RTF_DEFAULT;
> +		} else {
> +			cfg->fc_flags |= RTF_ROUTEINFO;
> +		}

    {} not needed here and above.

[...]

MBR, Sergei

  reply	other threads:[~2016-08-19 18:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 13:59 [PATCH 0/2] ipv6: fix stuck RA-derived route in container after migration with criu Andrew Yourtchenko
2016-08-16 13:59 ` [PATCH 1/2] ipv6: save route expiry in RTA_EXPIRES if RTF_EXPIRES set Andrew Yourtchenko
2016-08-16 13:59 ` [PATCH 2/2] ipv6: fixup RTF_* flags when restoring RTPROT_RA route from rtnetlink Andrew Yourtchenko
2016-08-19  4:09 ` [PATCH 0/2] ipv6: fix stuck RA-derived route in container after migration with criu David Miller
2016-08-19 16:41 ` [PATCH v2 " Andrew Yourtchenko
2016-08-19 16:41   ` [PATCH v2 1/2] ipv6: save route expiry in RTA_EXPIRES if RTF_EXPIRES set Andrew Yourtchenko
2016-08-19 20:26     ` Eric Dumazet
2016-08-22 11:41       ` Andrew Yourtchenko
2016-08-19 16:41   ` [PATCH v2 2/2] ipv6: fixup RTF_* flags when restoring RTPROT_RA route from rtnetlink Andrew Yourtchenko
2016-08-19 18:07     ` Sergei Shtylyov [this message]
2016-08-22 11:04       ` Andrew Yourtchenko
2016-08-22 11:06         ` Sergei Shtylyov

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=689653c8-bc05-705c-04d6-ff7570b28dd0@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=ayourtch@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).