summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | * settings: add match for proc cmdlineAdrian Freihofer2020-05-066-1/+319
| | | | | | | | | | | | | | | | | | 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.
| | * settings: add match verify functionAdrian Freihofer2020-05-061-0/+24
| |/
| * libnm: fix gtk-doc annotations for nm_setting_match_get_interface_names()Thomas Haller2020-05-061-1/+2
| | | | | | | | | | | | Otherwise the function is not usable via generated bindings. Fixes: 9b9dce9486a8 ('all: add 'match' setting')
| * device: avoid coverity warning about unused variableThomas Haller2020-05-062-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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);
| * po: update Ukrainian (uk) translationYuri Chornoivan2020-05-061-542/+603
| | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/493
| * initrd: merge branch 'bg/initrd-hostname'Beniamino Galvani2020-05-065-65/+197
| |\ | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/419
| | * man: initrd: describe differences from network-legacy moduleBeniamino Galvani2020-05-061-0/+28
| | |
| | * initrd: parse 'rd.net.timeout.dhcp' optionBeniamino Galvani2020-05-063-1/+14
| | |
| | * initrd: parse rd.peerdns earlyBeniamino Galvani2020-05-061-32/+18
| | | | | | | | | | | | | | | | | | Instead of generating connections and then apply the rd.peerdns to them, parse the option early and set it when each connection is created.
| | * initrd: save hostname to a file in /runBeniamino Galvani2020-05-064-27/+108
| | | | | | | | | | | | | | | | | | | | | Save the hostname read from command line to a file in /run so that it can be applied later by the NM dracut module. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/419
| | * initrd: add command line option to specify initrd data directoryBeniamino Galvani2020-05-062-5/+29
| |/
| * device: fix scope of variable in commit_option()Thomas Haller2020-05-041-1/+1
| |
| * bridge: merge branch 'ac/bridge_options_2'Antonio Cardace2020-05-0410-127/+833
| |\ | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/473
| | * nm-setting-bridge: add 'multicast-startup-query-interval' bridge optionAntonio Cardace2020-05-048-0/+70
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-startup-query-count' bridge optionAntonio Cardace2020-05-048-0/+69
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-query-response-interval' bridge optionAntonio Cardace2020-05-048-145/+215
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-query-interval' bridge optionAntonio Cardace2020-05-048-0/+70
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-querier-interval' bridge optionAntonio Cardace2020-05-048-0/+70
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-membership-interval' bridge optionAntonio Cardace2020-05-048-0/+71
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-last-member-interval' bridge optionAntonio Cardace2020-05-048-110/+225
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-last-member-count' bridge optionAntonio Cardace2020-05-048-43/+115
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add 'multicast-hash-max' bridge optionAntonio Cardace2020-05-0410-0/+89
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| | * nm-setting-bridge: add missing 'Since: X.Y' comments to optionsAntonio Cardace2020-05-041-0/+10
| |/ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1755768
| * po: update Ukrainian (uk) translationYuri Chornoivan2020-05-041-1193/+1272
| | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/489
| * platform: fix test failure when /proc is mounted read-onlyBeniamino Galvani2020-05-041-24/+53
| | | | | | | | | | Expect a failure when writing to /proc if the file system is mounted read-only.
| * keyfile: merge branch 'th/keyfile-cleanup-accessors'Thomas Haller2020-05-043-119/+167
| |\ | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/483
| | * keyfile: implement nm_keyfile_plugin_kf_get_string_list() directly without macroThomas Haller2020-05-041-29/+26
| | | | | | | | | | | | There is only one user of the macro left. Drop it.
| | * keyfile: add nm_keyfile_plugin_kf_get_integer_list_uint() to parse a list of ↵Thomas Haller2020-05-043-26/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integers We had three callers of nm_keyfile_plugin_kf_get_integer_list(). Two only wanted to read values in range of guint8. One, wanted to read unsigned integers (for which nm_keyfile_plugin_kf_get_integer_list() was not suitable). Instead, implement a integer list reader ourself. One change is that g_key_file_get_integer_list() would accept list elements with a number followed by a white space and garbage ([1]). We don't do that, so there is a change in behavior here. That seems preferable, we don't want to accept garbage. The error reason text from the reader now also changes, and obviously we no longer fail for integer values larger than G_MAXINT. [1] https://gitlab.gnome.org/GNOME/glib/-/blob/c9bf247eb90805cc7a0020db20b8808ed42fe61c/glib/gkeyfile.c#L4445
| | * keyfile: implement nm_keyfile_plugin_kf_set_string_list() directly without macroThomas Haller2020-05-041-14/+11
| | | | | | | | | | | | There is only one user of the macro left. Drop it.
| | * keyfile: refactor writing of G_TYPE_ARRAY list of unsigned integersThomas Haller2020-05-043-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keyfile handles GObject properties of type G_TYPE_ARRAY as a GArray of unsigned ints. That is correct, because all our properties of this GType happen to be of this kind. However, then the function was using nm_keyfile_plugin_kf_set_integer_list(), which only can handle signed integers. There was thus an assertion that all integers were non-negative. Which, probably was also correct, because NMSettingDcb would validate that all values of such kind are in fact positive. Anyway, that is an unexpected limitation (if not a bug). Fix that by handling the array as unsigned list of integers. Also, since glib doesn't provide an API for storing lists of unsigend integers, we have to implement our own. but that is no loss. We probably do it better anyway.
| | * keyfile: use NMStrBuf in nm_keyfile_plugin_kf_set_integer_list_uint8()Thomas Haller2020-05-042-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we were preallocating a string buffer of fixed size. For guint8 we reserved 3 characters per number, which is sufficient. However, it is not obviously sufficient. NMStrBuf would grow as needed. Next, I will add nm_keyfile_plugin_kf_set_integer_list_uint(), where it is more unclear how large the string can be at most. To avoid that question from the start, it will use NMStrBuf. To keep the implementations similar, use NMStrBuf also in this case.
| | * keyfile: refactor defining keyfile list getter/setter functionsThomas Haller2020-05-041-21/+24
| | |
| | * keyfile: refactor defining keyfile getter/setter functionsThomas Haller2020-05-041-20/+24
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Split the macros to define the setter and getter so that setters and getters are defined by separate macros. This will be used to define the boolean getter differently, but still using the macro to define the setter. Also, don't construct function names in the macro. Instead, pass the full names as argument to the macro. This helps with the problem where ctags/cscope is unable to locate the implementation of the function. Since we define the function with macro, the tools still don't recognize this as the location of the definition. But at least when showing all occurrences of the name, it can be found.
| * libnm: avoid compiler warning about uninitalized variable in ↵Thomas Haller2020-05-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nm_setting_bridge_port_remove_vlan_by_vid() With LTO, compiler warns: libnm-core/nm-setting-bridge-port.c: In function nm_setting_bridge_port_remove_vlan_by_vid: libnm-core/nm-setting-bridge-port.c:252:6: error: v_start may be used uninitialized in this function [-Werror=maybe-uninitialized] 252 | if (v_start == vid_start && v_end == vid_end) { | ^ libnm-core/nm-setting-bridge-port.c:239:10: note: v_start was declared here 239 | guint16 v_start, v_end; | ^ libnm-core/nm-setting-bridge-port.c:252:28: error: v_end may be used uninitialized in this function [-Werror=maybe-uninitialized] 252 | if (v_start == vid_start && v_end == vid_end) { | ^ libnm-core/nm-setting-bridge-port.c:239:19: note: v_end was declared here 239 | guint16 v_start, v_end; | ^ Avoid the (false positive) warning.
| * nm-online: fix build of nm-online for missing libcsiphash.laThomas Haller2020-05-021-0/+1
| | | | | | | | Fixes: e468b48ab7b8 ('nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environment')
| * dispatcher: merge branch 'th/dispatcher-doc-connectivity-change-arg'Thomas Haller2020-04-302-12/+15
| |\ | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/485
| | * dispatcher: minor cleanup error paths in script_dispatch()Thomas Haller2020-04-301-9/+8
| | | | | | | | | | | | Handle the error case first and return early.
| | * dispatcher: clarify documentation about first argument to dispatcher scripts ↵Thomas Haller2020-04-302-3/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | for "connectivity-change" The manual page claimed that for "connectivitiy-change" actions, the dispatcher scripts would get as first argument (the device name) "none". That was not done, only for "hostname" actions. For consistency, maybe that should be adjusted to also pass "none" for connectivity change events. However, "none" is really an odd value, if there is no device. Passing an empty word is IMO nicer. So stick to that behavior, despite being inconsistent. Also fix the documentation about that.
| * nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environmentThomas Haller2020-04-305-5/+30
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1828458 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/484
| * n-dhcp4: don't fail dispatch in case of receive errorsBeniamino Galvani2020-04-302-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently any error encountered in n_dhcp4_c_connection_dispatch_io() causes a dispatch failure and interrupts the library state machine. The recvmsg() on the socket can fail for different reasons; one of these is for example that the UDP request previously sent got a ICMP port-unreachable response. This can be reproduced in the following way: ip netns add ns1 ip link add veth0 type veth peer name veth1 ip link set veth1 netns ns1 ip link set veth0 up cat > dhcpd.conf <<EOF server-identifier 172.25.0.1; max-lease-time 120; default-lease-time 120; subnet 172.25.0.0 netmask 255.255.255.0 { range 172.25.0.100 172.25.0.200; } EOF ip -n ns1 link set veth1 up ip -n ns1 address add dev veth1 172.25.0.1/24 ip netns exec ns1 iptables -A INPUT -p udp --dport 67 -j REJECT ip netns exec ns1 dhcpd -4 -cf dhcpd.conf -pf /tmp/dhcp-server.pid If a client is started on veth0, it is able to obtain a lease despite the firewall rule blocking DHCP, because dhcpd uses a packet socket. Then it fails during the renewal because the recvmsg() fails: dhcp4 (veth0): send REQUEST of 172.25.0.178 to 172.25.0.1 dhcp4 (veth0): error -111 dispatching events dhcp4 (veth0): state changed bound -> fail The client should consider such errors non fatal and keep running. https://bugzilla.redhat.com/show_bug.cgi?id=1829178 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/486
| * keyfile: don't declare keyfile getters/setter functions with macroThomas Haller2020-04-301-40/+21
| | | | | | | | | | | | In general, I like macros. But in this case it seems the make the code harder to understand than it needs to be. There are repeated patterns in these declarations, but I feel they are better recognizible by aligning the lines nicely.
| * bus-manager/dhcp: don't log pointer values directlyThomas Haller2020-04-301-2/+6
| | | | | | | | | | Direct pointer values can be used to circumvent ASLR. Obfuscate the pointer values.
| * dhcp: cleanup build_signal_parameters() in nm-dhcp-helperThomas Haller2020-04-301-17/+30
| | | | | | | | | | | | Also, silently ignore all environment variables with a name that is not valid UTF-8. We would hit an assertion trying to put that in a GVariant (or sending it via D-Bus).
| * wifi: clear scan_request_ssids_hash if not neededThomas Haller2020-04-301-17/+30
| | | | | | | | | | It is very uncommon that a user provides explicit SSIDs to scan. So, most of the time there is nothing to do here.
| * wifi: don't unnecessarily trim tracked ssid listThomas Haller2020-04-301-7/+5
| | | | | | | | | | | | 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.
| * wifi: pass now_msec to _scan_request_ssids_fetch()Thomas Haller2020-04-301-4/+5
| | | | | | | | | | 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.
| * wifi: fix trimming list of tracked ssids to scanThomas Haller2020-04-301-1/+1
| | | | | | | | Fixes: e07fc217ecd7 ('wifi: rework scanning of Wi-Fi device')
| * wifi: really fix crash during dispose of NMDeviceWifiThomas Haller2020-04-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: e07fc217ecd7 ('wifi: rework scanning of Wi-Fi device') Fixes: a2deb0da5ef9 ('wifi: fix crash during dispose of NMDeviceWifi')
| * wifi: fix crash during dispose of NMDeviceWifiThomas Haller2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: e07fc217ecd7 ('wifi: rework scanning of Wi-Fi device')
| * clients/trivial: rename VpnPasswordName struct to have NM prefixThomas Haller2020-04-293-6/+6
| |