Commit 2bc6598b authored by Antonio Cardace's avatar Antonio Cardace

nm-setting-bond: only validate '[up|down]delay' option when miimon is enabled

Just looking at the hashtable entry of 'updelay' and 'downdelay' options
is wrong, we have to inspect their values to check if they're actually enabled
or not.

Otherwise bond connections with valid settings will fail when created:

$ nmcli c add type bond ifname bond99 bond.options miimon=0,updelay=0,mode=0
Error: Failed to add 'bond-bond99' connection: bond.options: 'updelay' option requires 'miimon' option to be set

Also add unit test for bond options when miimon=0 and [up|down]delay=0

https://bugzilla.redhat.com/show_bug.cgi?id=1805184

Fixes: d595f784 ('libnm: add libnm/libnm-core (part 1)')
parent 4dcfa48c
Pipeline #111385 failed with stages
in 0 seconds