netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Hongren Zheng <i@zenithal.me>
Cc: Daniel Borkmann <daniel@iogearbox.net>, netdev@vger.kernel.org
Subject: Re: [RFC] add extack errors for iptoken
Date: Thu, 1 Apr 2021 08:31:05 -0600	[thread overview]
Message-ID: <2854a1c9-ca3e-312d-c94f-12aea1469bc0@gmail.com> (raw)
In-Reply-To: <20210331204902.78d87b40@hermes.local>

On 3/31/21 9:49 PM, Stephen Hemminger wrote:
> @@ -5681,14 +5682,29 @@ static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token)
>  
>  	ASSERT_RTNL();
>  
> -	if (!token)
> +	if (!token) {

You forgot to add a message here.

>  		return -EINVAL;
> -	if (dev->flags & (IFF_LOOPBACK | IFF_NOARP))
> +	}
> +
> +	if (dev->flags & IFF_LOOPBACK) {
> +		NL_SET_ERR_MSG_MOD(extack, "Device is loopback");
>  		return -EINVAL;
> -	if (!ipv6_accept_ra(idev))
> +	}
> +
> +	if (dev->flags & IFF_NOARP) {
> +		NL_SET_ERR_MSG_MOD(extack, "Device does not do discovery");

'Device does not do neighbor discovery'

>  		return -EINVAL;
> -	if (idev->cnf.rtr_solicits == 0)
> +	}
> +
> +	if (!ipv6_accept_ra(idev)) {
> +		NL_SET_ERR_MSG_MOD(extack, "Device does accept route adverts");

How about
'Router advertisements are disabled for this device'


> +		return -EINVAL;
> +	}
> +
> +	if (idev->cnf.rtr_solicits == 0) {
> +		NL_SET_ERR_MSG(extack, "Device has disabled router solicitation");

How about

'Router solicitation is disabled on device'


  parent reply	other threads:[~2021-04-01 17:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 13:36 [PATCH iproute2] iptoken: Add doc on the conditions of iptoken Hongren Zheng
2021-03-31 22:26 ` Stephen Hemminger
2021-04-01 10:41   ` Hongren Zheng
2021-04-01  3:49 ` [RFC] add extack errors for iptoken Stephen Hemminger
2021-04-01 10:21   ` Hongren Zheng
2021-04-01 14:31   ` David Ahern [this message]
2021-04-01 15:06     ` Stephen Hemminger
2021-04-28 12:55   ` Hongren Zheng
2021-04-28 15:32     ` David Ahern
2021-05-29  6:31     ` Hongren Zheng
2021-05-31  2:42       ` Stephen Hemminger
2021-05-31  5:26         ` Hongren Zheng

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=2854a1c9-ca3e-312d-c94f-12aea1469bc0@gmail.com \
    --to=dsahern@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=i@zenithal.me \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).