802-3-ethernet.wake-on-lan nmcli strange behavior
Íñigo Huguet
ihuguet at redhat.com
Tue Aug 6 11:29:24 UTC 2024
wake-on-lan is a flags type property. Because of that, when you do
`set wake-on-lan magic`, nmcli/NM sets the `magic` single flag, not
the whole value of `wake-on-lan`. Sadly, there are at least 2
problems:
1. The special values "default" and "ignore" are treated internally
just as a normal flag. However, they should be treated as special
values that don't make sense if any other else is set.
2. none/disable/disabled are added in the code as special values to
clear all the other values. However, nmcli is probably trying to add
it as an individual flag again, instead of replacing the whole value
of the variable. And as it's value is 0x00, it has no effect (it's
like prev_value |= 0x00).
I've created a bug report for it:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1593
On Mon, Jul 29, 2024 at 8:38 PM Marco Moock <mm at dorfdsl.de> wrote:
>
> Hello!
>
> nmcli> print 802-3-ethernet.wake-on-lan
> 802-3-ethernet.wake-on-lan: magic, default
> nmcli> set 802-3-ethernet.wake-on-lan
> Allowed values for 'wake-on-lan' property: phy, unicast, multicast, broadcast, arp, magic, default, ignore, none, disable, disabled
> Enter 'wake-on-lan' value: magic
> nmcli> save
> Error: connection verification failed: 802-3-ethernet.wake-on-lan: Wake-on-LAN mode 'default' and 'ignore' are exclusive flags
> You may try running 'verify fix' to fix errors.
> nmcli>
>
> From where does the "ignore" come here?
>
> Why doesn't it clear the property when using none?
>
> nmcli> set 802-3-ethernet.wake-on-lan
> Allowed values for 'wake-on-lan' property: phy, unicast, multicast, broadcast, arp, magic, default, ignore, none, disable, disabled
> Enter 'wake-on-lan' value: none
> nmcli> print 802-3-ethernet.wake-on-lan
> 802-3-ethernet.wake-on-lan: magic, default
> nmcli>
>
> ethtool says: Supports Wake-on: pumbg
>
>
> --
> Gruß
> Marco
>
--
Íñigo Huguet
More information about the Networkmanager
mailing list