On Wed, Mar 31, 2021 at 08:49:02PM -0700, Stephen Hemminger wrote:
> Perhaps the following (NOT TESTED) kernel patch will show you how such error 
> messages
> could be added.

This is an elegant solution. I found extack is extensively used in 
the other parts of the kernel code for similar purposes.

I also checked the code of iproute2 and found a good support for
extack.

So I am OK with this PATCH.

Also I tested this patch against v5.12-rc5, it compiles and can boot 
with `make ARCH=x86_64 x86_64_defconfig` config in qemu.

I tested it with iproute2 and found a more friendly error prompt:

    $ ip token set ::2 dev enp0s3
    Error: ipv6: Device does accept route adverts.

Tested-by: Hongren Zheng <i...@zenithal.me>

> +             NL_SET_ERR_MSG_MOD(extack, "Device does accept route adverts");

Should be "Device does not accept route adverts".

Reply via email to