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'