[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2854a1c9-ca3e-312d-c94f-12aea1469bc0@gmail.com>
Date: Thu, 1 Apr 2021 08:31:05 -0600
From: David Ahern <dsahern@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>,
Hongren Zheng <i@...ithal.me>
Cc: Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org
Subject: Re: [RFC] add extack errors for iptoken
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'
Powered by blists - more mailing lists