summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* systemd: include <linux/sockios.h> in "sd-lldp.c" for SIOCGSTAMPNSnm-1-4Thomas Haller2020-03-061-0/+1
| | | | | | | | | | | | | Avoid compiler error on Fedora 31: CC src/systemd/src/libsystemd-network/libsystemd_nm_la-sd-lldp.lo src/systemd/src/libsystemd-network/sd-lldp.c: In function ‘lldp_receive_datagram’: src/systemd/src/libsystemd-network/sd-lldp.c:234:23: error: ‘SIOCGSTAMPNS’ undeclared (first use in this function); did you mean ‘SIOCGSTAMP_OLD’? 234 | if (ioctl(fd, SIOCGSTAMPNS, &ts) >= 0) | ^~~~~~~~~~~~ | SIOCGSTAMP_OLD (cherry picked from commit dac54598fbbeb922b46a19914832ef6df06811f1)
* shared/systemd: fix gettid() compat implementation shadowing function from glibcThomas Haller2020-03-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Fedora rawhide we get the following build failure: In file included from shared/systemd/src/basic/alloc-util.c:3: ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:114:21: error: static declaration of 'gettid' follows non-static declaration 114 | static inline pid_t gettid(void) { | ^~~~~~ In file included from /usr/include/unistd.h:1170, from /usr/include/glib-2.0/gio/gcredentials.h:32, from /usr/include/glib-2.0/gio/gio.h:46, from ./shared/nm-utils/nm-macros-internal.h:31, from ./shared/nm-default.h:293, from ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:22, from shared/systemd/src/basic/alloc-util.c:3: /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of 'gettid' was here 34 | extern __pid_t gettid (void) __THROW; | ^~~~~~ glibc supports now gettid() call ([1]) which conflicts with our compat implementation. Rename it. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92 (cherry picked from commit 10276322bde8f015e48ac06f6a7509f514eb46f0) (cherry picked from commit cfb970b2778d7bde97fea4f5718d4a2a9a9d68f5) (cherry picked from commit d160b7b990cef4470af1e957bb9cd436ebfe1dff) (cherry picked from commit b10a7e5786e9c6bb95bd014ee165b452c247da6d) (cherry picked from commit 4ae20ea80a88c8290809fa39aaaf3457cf1c0af7) (cherry picked from commit d943b538cf3e4a309f72d774ada44e8039688ba2) (cherry picked from commit b3332f6df63f1391f391a5288fdd3ad0a3c3cb9c)
* lldp: fix parsing of vlan-name attributeBeniamino Galvani2018-11-222-4/+5
| | | | | | | | | | | | | | | | | We used to read 3 bytes after the TLV, fix this. Also, check that string length is at most 32 bytes as specified in figure E.3 of IEEE 802.1AB-2009. Fixes: 18133ea1428648781dba74c26dd5d118e8d5ce33 https://bugzilla.redhat.com/show_bug.cgi?id=1652210 (cherry picked from commit e9097787102442d1db6e1ebfbe07140bf05318a2) (cherry picked from commit 05c27c3c504c776b2ff3f3e34e717300c5ac1a0f) (cherry picked from commit 6d4ad477b81e495a35767c996c9f4ad69f58e135) (cherry picked from commit b97d38e5799834474004b6cba2ddda3223ac5b1d) (cherry picked from commit 73b572e001b8f3e36c35b6e7aa59daac8be3c745) (cherry picked from commit d8c41cd8b02d29245b07f0df0189b084ad048e1c)
* systemd: merge branch 'CVE-2018-15688' into nm-1-4Thomas Haller2018-10-296-43/+34
|\
| * dhcp6: make sure we have enough space for the DHCP6 option headerLennart Poettering2018-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a vulnerability originally discovered by Felix Wilhelm from Google. CVE-2018-15688 LP: #1795921 https://bugzilla.redhat.com/show_bug.cgi?id=1639067 (cherry picked from commit 4dac5eaba4e419b29c97da38a8b1f82336c2c892) (cherry picked from commit 01ca2053bbea09f35b958c8cc7631e15469acb79) (cherry picked from commit fc230dca139142f409d7bac99dbfabe9b004e2fb) (cherry picked from commit cc1e5a7f5731f223d1eb8473fa0eecbedfc0ae5f) (cherry picked from commit c3221cb0c5b4a2936c198e33b6f7853141991277) (cherry picked from commit f4f765534191ed3c5d8e78b97333f3fd978a2b63) (cherry picked from commit 2a25872910606d83f0532d668e73ab4809ee7f90)
| * sd-dhcp: remove unreachable route after rebinding return NAKLi Song2018-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | (cherry picked from commit cc3981b1272b9ce37e7d734a7b2f42e84acac535) (cherry picked from commit 915c2f675a23b2ae16d292d1ac570706f76b384d) (cherry picked from commit cb77290a696dce924e2a993690634986ac035490) (cherry picked from commit f211b140a5861ddedc2424946e3ab07d3b642b5f) (cherry picked from commit 1cfefbb99ff3c2ab7a0f54829c6f3f787d9e6d77) (cherry picked from commit f3f5441820d0ecd0ff6861480ace696a6bf34fbd) (cherry picked from commit 7337cd21dd1e4a285ff1ae9463b42460a64c3107)
| * sd-dhcp6: make dhcp6_option_parse_domainname() not store empty domainYu Watanabe2018-10-291-37/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | This improves performance of fuzzer. C.f. oss-fuzz#11019. (cherry picked from commit 3c72b6ed4252e7ff5f7704bfe44557ec197b47fa) (cherry picked from commit 50403cccee28c7dcd54b138a0d3b3f69ea0204fe) (cherry picked from commit f11f5abb1a8b96b553d2d156f8b5cf440695c04d) (cherry picked from commit c836279fca80fb22ca7ef02acaa5b987fee61123) (cherry picked from commit 4ca0e57c46cf6861ec6f6b6c8e0d430edb3fa5b1) (cherry picked from commit 32e71d5bc09494736866fd78606994f8bf93b31d) (cherry picked from commit 331e81621e2ce822fa1c7658393c2daf7b910db8)
| * sd-dhcp-lease: fix memleaksYu Watanabe2018-10-291-0/+2
| | | | | | | | | | | | | | | | | | (cherry picked from commit e2975f854831d08a25b4f5eb329b6d04102e115f) (cherry picked from commit 157094abd83f933fad142758a7d177cfa1a347f7) (cherry picked from commit 3fd9d11619a5e60d375076fbe13851dd1d3a4a63) (cherry picked from commit 4439f07841bdddc6878132a993c229df032e8e85) (cherry picked from commit cbd0609cc482168912c747bad883ba6d434c2a11) (cherry picked from commit 3a070225b54692da89c801a1dc3df42a11d209a1)
| * dhcp6: fix an off-by-one error in dhcp6_option_parse_domainnameEvgeny Vereshchagin2018-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==14==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200055fa9c at pc 0x0000005458f1 bp 0x7ffc78940d90 sp 0x7ffc78940d88 READ of size 1 at 0x60200055fa9c thread T0 #0 0x5458f0 in dhcp6_option_parse_domainname /work/build/../../src/systemd/src/libsystemd-network/dhcp6-option.c:555:29 #1 0x54706e in dhcp6_lease_set_domains /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp6-lease.c:242:13 #2 0x53fce0 in client_parse_message /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp6-client.c:984:29 #3 0x53f3bc in client_receive_advertise /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp6-client.c:1083:13 #4 0x53d57f in client_receive_message /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp6-client.c:1182:21 #5 0x7f0f7159deee in source_dispatch /work/build/../../src/systemd/src/libsystemd/sd-event/sd-event.c:3042:21 #6 0x7f0f7159d431 in sd_event_dispatch /work/build/../../src/systemd/src/libsystemd/sd-event/sd-event.c:3455:21 #7 0x7f0f7159ea8d in sd_event_run /work/build/../../src/systemd/src/libsystemd/sd-event/sd-event.c:3512:21 #8 0x531f2b in fuzz_client /work/build/../../src/systemd/src/fuzz/fuzz-dhcp6-client.c:44:9 #9 0x531bc1 in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-dhcp6-client.c:53:9 #10 0x57bec8 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:570:15 #11 0x579d67 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:479:3 #12 0x57dc92 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:707:19 #13 0x580ca6 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:838:5 #14 0x55e968 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6 #15 0x551a1c in main /src/libfuzzer/FuzzerMain.cpp:20:10 #16 0x7f0f701a082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #17 0x41e928 in _start (/out/fuzz-dhcp6-client+0x41e928) https://github.com/systemd/systemd/pull/10200 https://github.com/systemd/systemd/commit/b387d3c1327a3ad2a2509bd3d3491e674392ff21 (cherry picked from commit 7cb7cffc4962245a32e87017bcf264005c043250) (cherry picked from commit cd3aacefdd0b91741b7b2e7b5ee5baab210addd9) (cherry picked from commit 5b140a77bc7b01dc002dbf28a7a2507a27a63d7c) (cherry picked from commit 0f25f47767794fb179edb9916566a208fbcfcb8f) (cherry picked from commit c13e43979e10e636e3787bf85a4d56fa5187e70d) (cherry picked from commit b7b2c8ad3829528eb24dacd91fac9056d731933a)
| * systemd/dhcp: fix assertion starting DHCP client without MAC addressThomas Haller2018-10-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An assertion in dhcp_network_bind_raw_socket() is triggered when starting an sd_dhcp_client without setting setting a MAC address first. - sd_dhcp_client_start() - client_start() - client_start_delayed() - dhcp_network_bind_raw_socket() In that case, the arp-type and MAC address is still unset. Note that dhcp_network_bind_raw_socket() already checks for a valid arp-type and MAC address below, so we should just gracefully return -EINVAL. Maybe sd_dhcp_client_start() should fail earlier when starting without MAC address. But the failure here will be correctly propagated and the start aborted. See-also: https://github.com/systemd/systemd/pull/10054 (cherry picked from commit 34af574d5810ab2b0d6d354cbc28135cde4a55b1) (cherry picked from commit 0a797bdc2a592385a21e7ed918c08ef54a346d99) (cherry picked from commit f37ed84ca495ee212b1e82b9c5a5682c4acfebcd) (cherry picked from commit 1031b2bb5c97bd48ff93f85537b3f5ce0f6f64bf) (cherry picked from commit 4ca49f52fae5c7841f873bc0a01d654dc19c2152) (cherry picked from commit 59941b21247c53091f303b58106f9b7a446835f1)
| * libsystemd-network: ipv4ll probe conflict counter (#5361)Jason Reeder2018-10-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug exists where the conflict counter is cleared regardless of whether or not the next probe attempt leads to a successful address acquisition. This causes 'bursts' of MAX_CONFLICTS probes followed by a delay of RATE_LIMIT_INTERVAL instead of a single probe each RATE_LIMIT_INTERVAL when beyond MAX_CONFLICTS. The conflict counter should only be cleared after an address is successfully acquired. This commit achieves that goal. From RFC3927: A host should maintain a counter of the number of address conflicts it has experienced in the process of trying to acquire an address, and if the number of conflicts exceeds MAX_CONFLICTS then the host MUST limit the rate at which it probes for new addresses to no more than one new address per RATE_LIMIT_INTERVAL. This is to prevent catastrophic ARP storms in pathological failure cases, such as a rogue host that answers all ARP probes, causing legitimate hosts to go into an infinite loop attempting to select a usable address. Signed-off-by: Jason Reeder <jasonreeder@gmail.com> (cherry picked from commit 0cbc024d591e1b1095d90494e0337dabd9ef2e19) (cherry picked from commit eb8fd9cdfd69028ef22a9d0de32ade9751fcea82)
| * systemd: drop xlocale.h includeLubomir Rintel2018-10-291-1/+0
|/ | | | | | | It is not needed and doesn't exist in glibc 2.26 or other libcs. systemd removed it in commit 284d1cd0a1 too. (cherry picked from commit a5d7cf5c4b4110175c98da6bed4eaaed5ba35b78)
* wifi: fix leaking fake AP in NMDeviceWifi's act_stage1_prepare()Thomas Haller2018-09-131-0/+1
| | | | | | | | | | Fixes: 96f40dcdcd8b2df204d64026f0315ff6370048fa (cherry picked from commit ef61d7909f594c4f3ec145d141387956a6d9c73e) (cherry picked from commit d08530ac4b3007f0b681388a8e7f3fc3d773ac09) (cherry picked from commit 6c4c12c796aa14dfad074933deb1e969179f2477) (cherry picked from commit 4a345b2e783bd4b88cf364e3178c105006b25c47) (cherry picked from commit ae112d0070fdcd365b42f0c91bf3e46fb8bd573b) (cherry picked from commit 0a95b1a5936b8e062c478b1dcd79a6618365bfc3)
* dhcp: fix leak in dhclient's dhclient_start()Thomas Haller2018-09-101-2/+6
| | | | | | | | | | Fixes: 5d6d5cd136e36ed2815b7c719ada32bc6d22b481 (cherry picked from commit c87faf07a10900804b914057a2673e0e070b0af4) (cherry picked from commit 8f9240de966e431c2b7623e88a4e37700086d355) (cherry picked from commit c740726b570c004635c43bc50c5dbbcde10cfd2e) (cherry picked from commit 0a69572cae6c2154a178de17c82674b14565cfaa) (cherry picked from commit 13aaad7c5bf6fd0a0cf105fb8b042dffdb11d9f3) (cherry picked from commit d95e1304e7bd45fe069aea90255d4f7627638fdb)
* Add calls to g_simple_async_result_set_check_cancellableBenjamin Berg2018-03-0814-0/+84
| | | | | | | | | | | | | | | | | | If an operation is cancelled through the GCancellable, then the idiom is that the operation is always cancelled, even if it has finished successfully. To ensure this is the case, add calls to g_simple_async_result_set_check_cancellable everywhere. Without this, e.g. gnome-control-center will crash when switching away from the power panel quickly, as the NMClient creation finishes asynchronously and g-c-c assume that G_IO_ERROR_CANCELLED is returned to ensure it doesn't access the now invalid user_data parameter. https://bugzilla.gnome.org/show_bug.cgi?id=794088 (cherry picked from commit 26c215e22dcfff9e61a58e9348991ed77c3f8861) (cherry picked from commit e1b99d92013303b921740bbd1ff862f11c7564dd) (cherry picked from commit 2e628535097cf28177feb20bd5277d02e8e2a3b5) (cherry picked from commit 4bcb4c4ef254c34f2611b1a5f5240025f42e95e1)
* bus-manager: don't leak connectionsBeniamino Galvani2017-10-151-3/+13
| | | | | | | | | | | | The bus manager takes extra references to the GDBusConnection every time g_dbus_object_manager_server_get_connection() its called, preventing its disposal once the connection is closed. This causes a leak for each DHCP event. https://bugzilla.redhat.com/show_bug.cgi?id=1461643 (cherry picked from commit 5b81d403386324f40af6cc23ad3d26682e52a9fa) (cherry picked from commit bb4b6be912570dd5fcfd544519b5e6d880f77e1e) (cherry picked from commit 44cbd3b036411c8b49bc2d34d4602fdc47d4921a)
* release: bump version to 1.4.7 (development)1.4.7-devBeniamino Galvani2017-07-171-1/+1
|
* release: bump version to 1.4.61.4.6Beniamino Galvani2017-07-172-3/+4
|
* release: update NEWSBeniamino Galvani2017-07-171-0/+14
|
* clients: fix appending integer to result in nmc_property_set_bytes()Thomas Haller2017-05-231-1/+4
| | | | | (cherry picked from commit d76c190dc72df042733cca13849e18bcc13eed65) (cherry picked from commit 06d3c95e4fc70561b12be80e5982487443d914ec)
* clients: fix setter for 802-1x.password-rawBeniamino Galvani2017-05-231-11/+12
| | | | | | | | The property is a GBytes, not a GByteArray. https://bugzilla.gnome.org/show_bug.cgi?id=782836 (cherry picked from commit 30393ee2360e8678188cc47d794f2199d50e82ba) (cherry picked from commit cc6c9468fc01d69505141ee8956766079dbed903)
* policy: fix memleak in lookup_callback() and cancellingThomas Haller2017-05-021-13/+11
| | | | | | | | | | | | | | When the operation is cancelled, we must not touch user_data. Note that NM_POLICY_GET_PRIVATE() theoretically doesn't dereference the pointer (does it?) but doing pointer arithmetic on a dangling pointer is a very ugly thing to do. And of course, the memleak. Fixes: 5c716c8af8ddca1d3f7510494754d875b01a8889 Fixes: a2cdf632045d60b26f7aff470dedb56c1f9b938d (cherry picked from commit 3215508293c26e9e8531c2482def598ef1bbbefd) (cherry picked from commit f1469558c0e117b41b2eb36ab1010f732a696374)
* device: fix restricting Generic connection by interface-nameThomas Haller2017-04-261-9/+17
| | | | | | | | | | | | | | | | | | | NMDeviceGeneric:check_connection_compatible() doesn't check for a matching interface name. It relies on the parent implementation to do that. The parent implementation calls nm_manager_get_connection_iface(). That fails for NM_SETTING_GENERIC_SETTING_NAME, because that one has no factory. Maybe this imbalance of having no factory for the Generic device is wrong, but usually factories only match a distinct set of device types, while the generic factory would handle them all (as last resort). Without this, activating a generic connection might activate the wrong interface. (cherry picked from commit 3876b10a4749638c3dcfa7e65b12bfee8030334c) (cherry picked from commit 753a2cc4d9c4bbf9ad6833ff0f073883ea3de7a0) (cherry picked from commit bd72919b476eb4f6eeb41fa22b34422576fd0eed)
* vlan: use parent interface mtu as defaultBeniamino Galvani2017-04-241-4/+14
| | | | | | | | | | | | | | | VLANs already inherit the MTU from parent device when manually activated. At boot, since the vlan interface is created before activating the parent, the MTU is left to the default value. Fix this by inheriting the MTU from parent when activating the VLAN. Note that this change is effective only when the connection has an actual IPv4 configuration; for all other cases users should explicitly set the desired MTU value in the 'ethernet.mtu' property. See master commit 7dde8d810604 ("vlan: use parent interface mtu as default") https://bugzilla.redhat.com/show_bug.cgi?id=1439166
* libnm: diconnect signal handler for NMObject from GDBusProxyThomas Haller2017-04-241-4/+39
| | | | | | | | Similar to commit 0429753dab39c245f280c47ee269d88cf92d7061 from nm-1-6 branch. Related: https://bugzilla.gnome.org/show_bug.cgi?id=778615 https://bugzilla.redhat.com/show_bug.cgi?id=1436603
* sparse: avoid clash with __bitwise and __force from 4.10 linux/types.hLubomir Rintel2017-04-241-22/+25
| | | | | | | | | | | It also used __bitwise and __force. It seems easier to rename our versions since they are local to this one single header. Also, undefine them afteerwards, so that we don't pollute the preprocessor macro namespace. https://github.com/systemd/systemd/pull/5061 (cherry picked from commit 13b2ac2214cb56264fc1e9b96e4ed4382da2db78)
* build: fix type on Makefile.amThomas Haller2017-04-201-1/+1
| | | | | | Fixes: 3cc00dd550fcbd83ec2f1af9eeb83bf5ec921d21 (cherry picked from commit e824dd34f0dc1bda10ab4102fc27d90f85c1462a) (cherry picked from commit 2ebc390734a9eaa65109ee989eed12282306aec7)
* ifcfg: also read DEFROUTE and GATEWAY from alias filesThomas Haller2017-04-205-16/+80
| | | | | | | | | Also accept DEFROUTE and GATEWAY when they are defined in alias files -- provided, that they are not yet defined in the main ifcfg file. (cherry picked from commit 3cc00dd550fcbd83ec2f1af9eeb83bf5ec921d21) (cherry picked from commit 4c595997f2037707fcc9800c38a8ee8a6630c0e3)
* ifcfg: ensure ipv4.method is not "disabled" when reading IP addresses from ↵Thomas Haller2017-04-201-0/+2
| | | | | | | | | | | | | | | alias files When the main ifcfg file contains no IP addresses, the method will be "disabled". Later, when reading IP addresses for the aliases, we must ensure that the method is manual. Otherwise, validation fails with ip.addresses: this property is not allowed for method=disabled (cherry picked from commit a8f0d88596d8dd2b807a7b0adee272c4f077dade) (cherry picked from commit be1daa4580267e448ad93b854da382026ea63281)
* device,default-route-manager: merge branch 'th/default-route-resync'Beniamino Galvani2017-04-031-19/+33
|\ | | | | | | (cherry picked from commit 6197c27f245999c21f5c8cea8983f51631446745)
| * default-route-manager: decryptify logging line for default-route-managerThomas Haller2017-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The default route manager logs for each entry relevant information, in a compact but cryptic way: default-route: entry[0/dev:0x5633d5528560:enp0s25:1:+sync]: record:add 0.0.0.0/0 via 192.168.0.1 dev 2 metric 100 mss 0 rt-src user (100) The flag whether a route is configured or not, was only expressed via 0|1. Change that to log instead: default-route: entry[0/dev:0x5633d5528560:enp0s25:+has:+sync]: record:add 0.0.0.0/0 via 192.168.0.1 dev 2 metric 100 mss 0 rt-src user (100) (cherry picked from commit 82bfb6c46d2ff1ca01c7dffd0a812bf53e08ff33)
| * default-route-manager: alyways force a sync of the default routeThomas Haller2017-04-031-14/+29
| | | | | | | | | | | | | | | | | | | | | | Whenever we call update for a non-assumed, synced route, we must force a resync with the platform. Even if according to our internal book-keeping the route is already configured, the route may have been removed externally. So we cannot assume that everything is still up-to-date. https://bugzilla.redhat.com/show_bug.cgi?id=1431268 (cherry picked from commit c3c251ea129eeb562d32ac44029714f8d644ad18)
| * default-route-manager: simplify determining synced flag in ↵Thomas Haller2017-04-031-3/+2
|/ | | | | | | | | _ipx_update_default_route() No change in behavior at all. The same logic applies, but this should be simpler to understand. (cherry picked from commit 0b3ba99409c135716292b6141d2161d395bca46b)
* settings-connection: fix Save()Lubomir Rintel2017-03-241-5/+12
| | | | | | | | | Avoid using new_settings when they are none. Also, don't shortcut when the connection hasn't been changed -- let the settings plugin decide if it needs to rewrite the connection. (cherry picked from commit b47340fd3f70c2636bb5dae56a5310b59b88cf7a) (cherry picked from commit 58c9a4195935fc7611f5cb1e85157e6e9d54f351)
* nm-manager: Use g_dbus_message_new_method_error_literal()Iain Lane2017-03-231-18/+18
| | | | | | | | | | | | | | | | | | | | GLib 2.52 added a G_GNUC_PRINTF attribute to g_dbus_message_new_method_error(). This triggered warning in NetworkManager when built with -Wformat, which is an error when built with -Werror=format-security. It seems that gcc isn't smart enough to see that (foo = "bar") should be treated as a literal. Fortunately there is a g_dbus_message_new_method_error_literal() function which does not take printf-style arguments, and we don't need them, so we can use that. This patch was originally by Rico Tzschichholz <ricotz@ubuntu.com>, and was submitted to Launchpad at https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1650972 https://bugzilla.gnome.org/show_bug.cgi?id=780444 (cherry picked from commit 6a77258f4ec23cfe15d944d0f106118a96c6f780) (cherry picked from commit 1715ec53c1f6ceb5635d930100f2fe06fa9d130e)
* ppp: only request IPV6CP when IPv6 is enabled in the connectionDan Williams2017-03-221-4/+12
| | | | | | | | | | | | | | NM always asks pppd to run IPV6CP which will complete if the modem supports IPv6. If the user doesn't want IPv6 then NM just ignores the result. But if the host has disabled IPv6, then pppd will fail to complete the connection because pppd tries to assign the Link-Local address to the pppX interface, and if IPv6 is disabled that fails and terminates the PPP session. So only request IPV6CP when the user wants IPv6 on the connection; if they have disabled IPv6 on their host then they can simply set ipv6.method=ignore. https://mail.gnome.org/archives/networkmanager-list/2017-March/msg00047.html (cherry picked from commit 8d4570d28d1825d52de936b21d785c75b602394a)
* po: make update-poThomas Haller2017-03-2266-97906/+109925
|
* zanata: update project-versionThomas Haller2017-03-211-1/+1
|
* manager: ensure proper disposal of unrealized devicesBeniamino Galvani2017-03-211-0/+5
| | | | | | | | | | When remove_device() is called on an already unrealized device, we should release it from master if necessary and clear its IP configurations to avoid leaks. https://bugzilla.redhat.com/show_bug.cgi?id=1433303 (cherry picked from commit 2e0c3d1dacfa06fad0062d272fc77ecc34ba4576) (cherry picked from commit 427a3e5cff1bf852c17ef2b359676d037bd58f67)
* libnm: fix memleak of GUdevDevice in get_bus_name()Thomas Haller2017-03-202-0/+2
| | | | | | Fixes: f7b1b2820245aff26da0c2c946b55752e91112e5 (cherry picked from commit c033330c413b04b0897a5a557deeba216ea89e2c) (cherry picked from commit 6311bf6666540053155c3c4c681f941162ccadb9)
* nm-object: initialize the object buffer to zeroLubomir Rintel2017-03-161-1/+1
| | | | (cherry picked from commit df46c597754d77c09a0b5e1fcab6981560337e6c)
* device: fail DHCPv6 if a link-local address is not presentBeniamino Galvani2017-03-151-5/+8
| | | | | | | | | | | | | | | | Instead of throwing an assertion, fail DHCPv6 when a IPv6 link-local address is not configured on the device. There are different reasons why the assertion may fail: for example the address was removed externally; or the device is gone (and thus the platform already received the notification of addresses removal) but the device is still connecting because its disposal happens in an idle callback. None of these deserves an assertion, which should only be for programming errors. https://bugzilla.redhat.com/show_bug.cgi?id=1432251 (cherry picked from commit 4987ec408a2e800de2278cd74e9f012dc69b8ed3) (cherry picked from commit 238fc872985809971c9439a08947dc29d22dad5c)
* libnm: chain up NMRemoteConnection::constructed() functionThomas Haller2017-03-091-0/+2
| | | | | | Fixes: 0fdd71fe6ece66a801f5ff66e0d26b7d26953c14 (cherry picked from commit 9ed0e3705e16822c64e8f986f18eae920c417ff6) (cherry picked from commit 8a857c4475a0ae826a7cd99e5afadb5ed3c0e253)
* platform: filter out invisible links for cache lookup by nameThomas Haller2017-03-091-1/+5
| | | | | | Fixes: ad1d74d142606e6ba434051a85cebad6bded69e8 (cherry picked from commit f0e295d3d746eb1350e0af263263e683a7bb7746) (cherry picked from commit 5cd90717ad00caa75fdeaf1adb5d7c7b96dd40df)
* tui: generate names for bonds, teams and bridgesLubomir Rintel2017-02-201-1/+39
| | | | | | | | | | | | | This makes it more likely that the user will end up with a master connection that has connection.interface-name property. This makes it possible for ifcfg plugin to specify the master in the for of device name (as opposed to UUID) for compatibility with the legacy network tooling. This is equivalent to what nmcli does. https://bugzilla.redhat.com/show_bug.cgi?id=1369091 (cherry picked from commit ff46158d9ecd153fa4b0be71f679fa61212715f2)
* platform: fix detection of primary/secondary addressesBeniamino Galvani2017-02-081-5/+17
| | | | | | | | | ip4_addr_subnets_is_secondary() should fill the list of addresses in the same subnet also when returning FALSE, because nm_platform_ip4_address_sync() uses it. Fixes: 2f68a5004153cea9878999bf3a442ecda263e5f7 (cherry picked from commit a347962831ed127338a13b7a0939302d42bcfe60)
* platform: fix the order of addition of primary and secondary IPv4 addressesBeniamino Galvani2017-02-081-10/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nm_platform_ip4_address_sync() tries to apply the new configuration with the minimum effort and doesn't delete addresses if they are already present on the interface. This can break the ordering, as an existing address would be promoted by kernel to primary, even if it was last in our configuration. Add some logic to ensure the correct order of addresses is always enforced. This fixes situations like: # nmcli connection add type ethernet ifname eth0 con-name t \ ipv4.method manual \ ipv4.addresses "1.1.1.1/24,1.1.1.2/24,1.1.1.5/24" # nmcli connection up t => addresses are applied in the right order: inet 1.1.1.1/24 brd 1.1.1.255 scope global eth0 inet 1.1.1.2/24 brd 1.1.1.255 scope global secondary eth0 inet 1.1.1.5/24 brd 1.1.1.255 scope global secondary eth0 # nmcli connection mod t ipv4.addresses "1.1.1.5/24,1.1.1.2/24,1.1.1.1/24" # nmcli device reapply eth0 => order is wrong: inet 1.1.1.2/24 brd 1.1.1.255 scope global eth0 inet 1.1.1.5/24 brd 1.1.1.255 scope global secondary eth0 inet 1.1.1.1/24 brd 1.1.1.255 scope global secondary eth0 Co-Authored-By: Thomas Haller <thaller@redhat.com> (cherry picked from commit 2f68a5004153cea9878999bf3a442ecda263e5f7)
* device/wifi: drop messing with wpa-supplicant's support for MAC address ↵Thomas Haller2017-02-071-82/+2
| | | | | | | | | | | | | | | | | randomization We no longer use wpa_supplicant for MAC address randomization. Instead, NetworkManager handles it on it's own. It is actually important that supplicant does not interfere when setting the MAC address of the device. The code was only in effect when supplicant has a PreassocMacAddr property. As this is a recent feature, the left-over code wasn't noticed until now. https://mail.gnome.org/archives/networkmanager-list/2017-February/msg00003.html Fixes: 767abfa69040c62ae1dc0989a77df8c5e0e489c1 (cherry picked from commit 0cb85f161ea332dc400d7e33071ca1f3dfafd730) (cherry picked from commit 7ada0e0bc3a90852ed3f043a1c642eaa29cd7f58)
* bond: fix crash in update_connection()Beniamino Galvani2017-02-071-1/+2
| | | | | | | The value read from sysfs can be NULL. Fixes: 2324410a75dda09d4c46362d29fb84048bfe9fcd (cherry picked from commit 0683ad5db2f1cb1237b1781d4a3b0b666f6dea9b)
* libnm-core: remove INFERRABLE flag from dhcp-hostname propertyFrancesco Giudici2017-02-061-1/+0
| | | | | | | | | When assuming a dhcp connection don't consider the DHCP "Host Name" Option (12) passed in the DHCP request for the match of the available connections. https://bugzilla.redhat.com/show_bug.cgi?id=1393997 (cherry picked from commit 0ce7da1e22abf7a4415ef40fca9f1755b8ddfa30)