netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: "network dev" <netdev@vger.kernel.org>,
	davem <davem@davemloft.net>,
	"Mantas Mikulėnas" <grawity@gmail.com>
Subject: Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT
Date: Mon, 31 Jul 2017 20:01:32 -0600	[thread overview]
Message-ID: <b0edcf05-9ce4-94d4-3662-767e6ff86843@gmail.com> (raw)
In-Reply-To: <CADvbK_dWwZU1EXf4ehAyV9cWOK-7b4hn=mGrytGTYACrCUUQ6g@mail.gmail.com>

On 7/31/17 7:40 PM, Xin Long wrote:
> To respect the old code more, setting RTPROT_RA only when
> it's with the flag (ADDRCONF | DEFAULT | ROUTEINFO),
> shouldn't it be:

Look at rtm_fill_info:

	if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ROUTEINFO))
                        rtm->rtm_protocol = RTPROT_RA;


If either flag is set the protocol should be RTPROT_RA and looking at
both places that seems correct to me.

  reply	other threads:[~2017-08-01  2:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-30 12:51 [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT Xin Long
2017-07-31  2:35 ` David Ahern
2017-07-31  3:31   ` Xin Long
2017-08-01  0:12     ` David Ahern
2017-08-01  1:40       ` Xin Long
2017-08-01  2:01         ` David Ahern [this message]
2017-08-01  2:50           ` Xin Long

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=b0edcf05-9ce4-94d4-3662-767e6ff86843@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=grawity@gmail.com \
    --cc=lucien.xin@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).