Thomas Haller
6044fce960
bridge: refactor definition of options array to use a macro and C99 designated initializer
...
Yes, it's a macro and it's more lines of code.
But I think this is much easier to read and to maintain.
2020-05-08 08:02:51 +02:00
Thomas Haller
7c22710c17
libnm: use boolean values for range of NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE in slave_options
2020-05-08 08:02:51 +02:00
Thomas Haller
bfcfdc2955
libnm: adjust bridge defines NM_BRIDGE_VLAN_STATS_ENABLED_DEF
2020-05-08 08:02:51 +02:00
Thomas Haller
f34144f70b
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_*
2020-05-08 08:02:51 +02:00
Thomas Haller
55311c6a6a
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_STARTUP_QUERY_COUNT_*
2020-05-08 08:02:51 +02:00
Thomas Haller
433bb1fbe4
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_SNOOPING_DEF
2020-05-08 08:02:50 +02:00
Thomas Haller
96bb90a1ef
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEF
2020-05-08 08:02:50 +02:00
Thomas Haller
0db1d28e6d
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_RESPONSE_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
58001f70e8
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
08cfe812ec
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERIER_DEF
2020-05-08 08:02:50 +02:00
Thomas Haller
da6bbd73aa
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERIER_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
a75ec12d8b
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
ec9e58ee01
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
769b176263
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_COUNT_*
2020-05-08 08:02:50 +02:00
Thomas Haller
4c3691e52e
libnm: adjust bridge defines NM_BRIDGE_PORT_PATH_COST_*
2020-05-08 08:02:49 +02:00
Thomas Haller
a7421f8bf2
libnm: adjust bridge defines NM_BRIDGE_PORT_PRIORITY_*
2020-05-08 08:02:49 +02:00
Thomas Haller
a690cedcba
libnm: adjust bridge defines NM_BRIDGE_PRIORITY_*
2020-05-08 08:02:49 +02:00
Thomas Haller
e2cb0837cc
libnm: adjust bridge defines NM_BRIDGE_MAX_AGE_*
2020-05-08 08:02:49 +02:00
Thomas Haller
d7dd4c70d0
libnm: adjust bridge defines NM_BRIDGE_HELLO_TIME_*
2020-05-08 08:02:49 +02:00
Thomas Haller
696fae40b7
libnm: adjust bridge defines NM_BRIDGE_STP_DEF
2020-05-08 08:02:49 +02:00
Thomas Haller
8ee4dbf709
libnm: adjust bridge defines NM_BRIDGE_FORWARD_DELAY_*
2020-05-08 08:02:49 +02:00
Thomas Haller
f61e354cfa
libnm: adjust bridge defines NM_BRIDGE_AGEING_TIME_*
2020-05-08 08:02:48 +02:00
Thomas Haller
f5527ecc5a
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_HASH_MAX_*
2020-05-08 08:02:48 +02:00
Thomas Haller
83830badda
device: use NM_G_PARAM_SPEC_GET_DEFAULT_*() in NMDeviceBridge's commit_option()
2020-05-08 08:02:48 +02:00
Thomas Haller
6e9967939b
acd: fix char buffer argument to _acd_event_to_string_buf()
2020-05-08 07:43:27 +02:00
Thomas Haller
b447c80ad8
acd: avoid alloca() inside an unbounded loop
2020-05-07 13:58:08 +02:00
Thomas Haller
d170f8b7f2
device: fix compilation error "--without-more-asserts"
...
Defining the name "dispose" breaks
object_class->dispose = dispose;
below.
Fixes: fdba9200c0 ('device: avoid coverity warning about unused variable')
2020-05-07 11:15:22 +02:00
Thomas Haller
5beb42b942
device: style fixes
2020-05-06 17:10:31 +02:00
Thomas Haller
bdd0e89b9a
device: handle match.driver also with unknown device driver
...
If the driver is unknown, that doesn't necessarily mean that the match
passes. Instead, the match passes if there is no positive match that
asks for the driver name.
2020-05-06 16:20:11 +02:00
Adrian Freihofer
214b31dcbc
settings: add match for driver
...
Add a new "driver" match option to nm-settings. It allows to disable a
network connection configuration if a pattern is found or is not found
in the device driver name.
2020-05-06 15:05:21 +02:00
Adrian Freihofer
3a8e46f2a5
settings: add match for proc cmdline
...
Add a new "kernel-command-line" match option to nm-settings. It allows
to disable a network connection configuration if a pattern is found or
is not found in /proc/cmdline.
2020-05-06 15:05:20 +02:00
Thomas Haller
fdba9200c0
device: avoid coverity warning about unused variable
...
This warning is from coverity against 1.18.6. But it applies
in a similar manner here.
1. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: warning: Value stored to 'priv' during its initialization is never read
# NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: note: Value stored to 'priv' during its initialization is never read
# NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 809| {
# 810| NMDeviceMacsec *self = NM_DEVICE_MACSEC (object);
# 811|-> NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# 812|
# 813| macsec_secrets_cancel (self);
2020-05-06 11:50:15 +02:00
Thomas Haller
05fd2a9272
device: fix scope of variable in commit_option()
2020-05-04 18:01:38 +02:00
Antonio Cardace
05d9381060
nm-setting-bridge: add 'multicast-startup-query-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:01 +02:00
Antonio Cardace
abe660f780
nm-setting-bridge: add 'multicast-startup-query-count' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
62facc59e8
nm-setting-bridge: add 'multicast-query-response-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
9842c55503
nm-setting-bridge: add 'multicast-query-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
b9b9a95395
nm-setting-bridge: add 'multicast-querier-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
c1bc1570f3
nm-setting-bridge: add 'multicast-membership-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
1c437090ff
nm-setting-bridge: add 'multicast-last-member-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
c49f20887a
nm-setting-bridge: add 'multicast-last-member-count' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
673d51bd5c
nm-setting-bridge: add 'multicast-hash-max' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:32:59 +02:00
Thomas Haller
d9740d108d
wifi: clear scan_request_ssids_hash if not needed
...
It is very uncommon that a user provides explicit SSIDs to scan.
So, most of the time there is nothing to do here.
2020-04-30 10:36:41 +02:00
Thomas Haller
3af9209d47
wifi: don't unnecessarily trim tracked ssid list
...
Only _scan_request_ssids_track() adds elements to the list, and that already
trims the list to a maxium length. In all other cases, we never expect a need
to trim the list.
2020-04-30 10:07:36 +02:00
Thomas Haller
a0e115cb44
wifi: pass now_msec to _scan_request_ssids_fetch()
...
We make decisions based on the timestamp. We should only fetch the timestamp
once, and make consistent decisions about that. Don't read different timestamps.
2020-04-30 10:06:55 +02:00
Thomas Haller
8fb2241183
wifi: fix trimming list of tracked ssids to scan
...
Fixes: e07fc217ec ('wifi: rework scanning of Wi-Fi device')
2020-04-30 10:06:55 +02:00
Thomas Haller
2794f3cff8
wifi: really fix crash during dispose of NMDeviceWifi
...
The right fix is to return from _scan_kickoff() right away.
Backtrace:
#0 0x00007f520eeb2002 g_logv (libglib-2.0.so.0 + 0x5a002)
#1 0x00007f520eeb2273 g_log (libglib-2.0.so.0 + 0x5a273)
#2 0x000056026929b25a nm_supplicant_interface_get_max_scan_ssids (NetworkManager + 0x27e25a)
#3 0x00007f520c238bb1 _scan_request_ssids_build_hidden (libnm-device-plugin-wifi.so + 0x15bb1)
#4 0x00007f520c23a2d5 _scan_notify_is_scanning (libnm-device-plugin-wifi.so + 0x172d5)
#5 0x00007f520c2433d3 dispose (libnm-device-plugin-wifi.so + 0x203d3)
#6 0x00007f520efa3c78 g_object_unref (libgobject-2.0.so.0 + 0x18c78)
#7 0x00005602690ada1a remove_device (NetworkManager + 0x90a1a)
#8 0x00005602690be428 nm_manager_stop (NetworkManager + 0xa1428)
#9 0x0000560269064adb main (NetworkManager + 0x47adb)
#10 0x00007f520ec70042 __libc_start_main (libc.so.6 + 0x27042)
#11 0x0000560269064efe _start (NetworkManager + 0x47efe)
Fixes: e07fc217ec ('wifi: rework scanning of Wi-Fi device')
Fixes: a2deb0da5e ('wifi: fix crash during dispose of NMDeviceWifi')
2020-04-30 10:05:54 +02:00
Thomas Haller
a2deb0da5e
wifi: fix crash during dispose of NMDeviceWifi
...
Backtrace:
#0 0x00007f520eeb2002 g_logv (libglib-2.0.so.0 + 0x5a002)
#1 0x00007f520eeb2273 g_log (libglib-2.0.so.0 + 0x5a273)
#2 0x000056026929b25a nm_supplicant_interface_get_max_scan_ssids (NetworkManager + 0x27e25a)
#3 0x00007f520c238bb1 _scan_request_ssids_build_hidden (libnm-device-plugin-wifi.so + 0x15bb1)
#4 0x00007f520c23a2d5 _scan_notify_is_scanning (libnm-device-plugin-wifi.so + 0x172d5)
#5 0x00007f520c2433d3 dispose (libnm-device-plugin-wifi.so + 0x203d3)
#6 0x00007f520efa3c78 g_object_unref (libgobject-2.0.so.0 + 0x18c78)
#7 0x00005602690ada1a remove_device (NetworkManager + 0x90a1a)
#8 0x00005602690be428 nm_manager_stop (NetworkManager + 0xa1428)
#9 0x0000560269064adb main (NetworkManager + 0x47adb)
#10 0x00007f520ec70042 __libc_start_main (libc.so.6 + 0x27042)
#11 0x0000560269064efe _start (NetworkManager + 0x47efe)
Fixes: e07fc217ec ('wifi: rework scanning of Wi-Fi device')
2020-04-29 21:15:19 +02:00
Thomas Haller
12a54a44f8
wifi: reduce scan rate limiting while not being activated
...
While we are not activated, there is less need to rate limit the scan
requests to 8 seconds. Only rate limit the requests for 1.5 seconds
in that case.
Also, when changing the MAC address, supplicant flushes the AP list.
We should be able to scan right away. Reset the counters for the rate
limiting and periodic scanning.
2020-04-29 13:45:24 +02:00
Thomas Haller
c9ae23af5e
wifi: don't limit active scans for SSIDs to 5
...
As far as NMSupplicantInterface is concerned, don't clamp the
max-scan-ssids to 5. We should track the real value that wpa_supplicant
announces, and it's up to the caller to provide fewer SSIDs.
In particular, we want to limit the number of hidden SSIDs that we
accept from connection profiles, but we don't want to limit the number
of active scans via `nmcli device wifi rescan ssid $SSID [...]`.
2020-04-29 12:23:01 +02:00