summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | supplicant: don't allow scans to trigger a supplicant roaming decisionDan Williams2017-08-111-0/+1
| | | | | | | | | | | | | | Just because the user requested a scan doesn't mean the supplicant should use the result of that scan to jump to an AP that's slightly better than the current one. Let the supplicant handle when it's supposed to roam based on it's own logic, not random scans from users or NM clients.
* | devices/wifi: delegate connected periodic scanning to the supplicant (bgo ↵Dan Williams2017-08-114-375/+315
| | | | | | | | | | | | | | | | | | | | | | #766482) Enable background scanning for most WiFi connections except for shared/AP and BSSID-locked ones. Make the non-WPA-Enterprise interval very, very long to effectively disable periodic scanning while connected. Related: https://bugzilla.gnome.org/show_bug.cgi?id=766482
* | devices/wifi: flip meaning of scanning allowed signalDan Williams2017-08-113-65/+45
| | | | | | | | | | | | | | | | | | | | Change it to return TRUE when scanning is prohibited so that we don't have to use use g_signal_emitv() and its special handling of return values. Make the return value only change when we don't want the default behavior (which would be to allow the scan). Also add a parameter to the signal indicating whether the scan is user/dbus-requested or whether it's an internal periodic scan.
* | systemd: merge branch systemd into masterBeniamino Galvani2017-08-1036-152/+1557
|\ \ | |/ | | | | | | | | - fix DHCP over Infiniband https://bugzilla.redhat.com/show_bug.cgi?id=1477678
| * systemd: update code from upstream (2017-08-09)Beniamino Galvani2017-08-0932-148/+1538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2017-08-09, git commit c7f6ca9379279affa8f22d15fa13063491f86a49. ====== SYSTEMD_DIR=../systemd COMMIT=c7f6ca9379279affa8f22d15fa13063491f86a49 ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files :/src/systemd/src/ | xargs -d '\n' rm -f nm_copy_sd() { mkdir -p "./src/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/systemd/$1" } nm_copy_sd "src/basic/alloc-util.c" nm_copy_sd "src/basic/alloc-util.h" nm_copy_sd "src/basic/async.h" nm_copy_sd "src/basic/escape.c" nm_copy_sd "src/basic/escape.h" nm_copy_sd "src/basic/ether-addr-util.c" nm_copy_sd "src/basic/ether-addr-util.h" nm_copy_sd "src/basic/extract-word.c" nm_copy_sd "src/basic/extract-word.h" nm_copy_sd "src/basic/fileio.c" nm_copy_sd "src/basic/fileio.h" nm_copy_sd "src/basic/fd-util.c" nm_copy_sd "src/basic/fd-util.h" nm_copy_sd "src/basic/fs-util.c" nm_copy_sd "src/basic/fs-util.h" nm_copy_sd "src/basic/hash-funcs.c" nm_copy_sd "src/basic/hash-funcs.h" nm_copy_sd "src/basic/hashmap.c" nm_copy_sd "src/basic/hashmap.h" nm_copy_sd "src/basic/hexdecoct.c" nm_copy_sd "src/basic/hexdecoct.h" nm_copy_sd "src/basic/hostname-util.c" nm_copy_sd "src/basic/hostname-util.h" nm_copy_sd "src/basic/in-addr-util.c" nm_copy_sd "src/basic/in-addr-util.h" nm_copy_sd "src/basic/io-util.c" nm_copy_sd "src/basic/io-util.h" nm_copy_sd "src/basic/list.h" nm_copy_sd "src/basic/log.h" nm_copy_sd "src/basic/macro.h" nm_copy_sd "src/basic/mempool.h" nm_copy_sd "src/basic/mempool.c" nm_copy_sd "src/basic/parse-util.c" nm_copy_sd "src/basic/parse-util.h" nm_copy_sd "src/basic/path-util.c" nm_copy_sd "src/basic/path-util.h" nm_copy_sd "src/basic/prioq.h" nm_copy_sd "src/basic/prioq.c" nm_copy_sd "src/basic/process-util.h" nm_copy_sd "src/basic/process-util.c" nm_copy_sd "src/basic/random-util.c" nm_copy_sd "src/basic/random-util.h" nm_copy_sd "src/basic/refcnt.h" nm_copy_sd "src/basic/set.h" nm_copy_sd "src/basic/signal-util.h" nm_copy_sd "src/basic/siphash24.c" nm_copy_sd "src/basic/siphash24.h" nm_copy_sd "src/basic/socket-util.c" nm_copy_sd "src/basic/socket-util.h" nm_copy_sd "src/basic/sparse-endian.h" nm_copy_sd "src/basic/stdio-util.h" nm_copy_sd "src/basic/string-table.c" nm_copy_sd "src/basic/string-table.h" nm_copy_sd "src/basic/string-util.c" nm_copy_sd "src/basic/string-util.h" nm_copy_sd "src/basic/strv.c" nm_copy_sd "src/basic/strv.h" nm_copy_sd "src/basic/time-util.c" nm_copy_sd "src/basic/time-util.h" nm_copy_sd "src/basic/umask-util.h" nm_copy_sd "src/basic/unaligned.h" nm_copy_sd "src/basic/utf8.c" nm_copy_sd "src/basic/utf8.h" nm_copy_sd "src/basic/util.c" nm_copy_sd "src/basic/util.h" nm_copy_sd "src/libsystemd-network/arp-util.c" nm_copy_sd "src/libsystemd-network/arp-util.h" nm_copy_sd "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd "src/libsystemd-network/dhcp6-network.c" nm_copy_sd "src/libsystemd-network/dhcp6-option.c" nm_copy_sd "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd "src/libsystemd-network/dhcp-internal.h" nm_copy_sd "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd "src/libsystemd-network/dhcp-network.c" nm_copy_sd "src/libsystemd-network/dhcp-option.c" nm_copy_sd "src/libsystemd-network/dhcp-packet.c" nm_copy_sd "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd "src/libsystemd-network/lldp-internal.h" nm_copy_sd "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd "src/libsystemd-network/lldp-network.c" nm_copy_sd "src/libsystemd-network/lldp-network.h" nm_copy_sd "src/libsystemd-network/network-internal.c" nm_copy_sd "src/libsystemd-network/network-internal.h" nm_copy_sd "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd "src/libsystemd-network/sd-lldp.c" nm_copy_sd "src/libsystemd/sd-event/sd-event.c" nm_copy_sd "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd "src/shared/dns-domain.c" nm_copy_sd "src/shared/dns-domain.h" nm_copy_sd "src/systemd/_sd-common.h" nm_copy_sd "src/systemd/sd-dhcp6-client.h" nm_copy_sd "src/systemd/sd-dhcp6-lease.h" nm_copy_sd "src/systemd/sd-dhcp-client.h" nm_copy_sd "src/systemd/sd-dhcp-lease.h" nm_copy_sd "src/systemd/sd-event.h" nm_copy_sd "src/systemd/sd-ndisc.h" nm_copy_sd "src/systemd/sd-id128.h" nm_copy_sd "src/systemd/sd-ipv4acd.h" nm_copy_sd "src/systemd/sd-ipv4ll.h" nm_copy_sd "src/systemd/sd-lldp.h"
* | core: fix crash with bluetooth device factory wrongly claiming NAP connectionThomas Haller2017-08-062-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bluetooth device *never* manages NAP connection. Hence, checking for nm_bt_vtable_network_server in "nm-bluez-manager.c" is wrong. Especially, because nm_bt_vtable_network_server is only initialized much later, so during initial start, the bluetooth factory would wronly claim to support it. This leads to a crash when having a NAP connection. Also, the bridge factory requires the bluetooth plugin. It should only claim to support NAP when the bluetooth plugin is present. That way, we get a proper "missing plugin" error message, instead of failing later during activation. It seems to me, distributing the logic to various match_connection() functions makes it more complicated, because the implementation is spread out and interact in complicated ways. Anyway. Fixes: 8665cdfefff50bb575eb03893d6361930bc8ad40
* | core: ppp: use a different unit for each activationBeniamino Galvani2017-08-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't tell pppd to create an interface with a given name, so we use the name generated by kernel and rename the interface afterwards. A race condition can happen during the rename: NM receives the interface name from pppd, but in the meantime the interface could be deleted and another one with that name could appear. In this case we would rename the wrong interface. Using a changing unit index, we ensure that interfaces created by NM don't race with each others. There is still the chance to race with externally-created interfaces, but I guess this is not easily solvable since the pppd plugin does not expose the ifindex. When the specified unit is already in use, the kernel selects another one.
* | device: use ppp device for new style pppoe settingBeniamino Galvani2017-08-051-0/+16
| |
* | core: implement activation of PPP devicesBeniamino Galvani2017-08-055-3/+293
| | | | | | | | | | | | | | | | | | | | | | | | Add code to NMPppDevice to activate new-style PPPoE connections. This is a bit tricky because we can't create the link as usual in create_and_realize(). Instead, we create a device without ifindex and start pppd in stage2; when pppd reports a new configuration, we rename the platform link to the correct name and set the ifindex into the device. This mechanism is inherently racy, but there is no way to tell pppd to create an arbitrary interface name.
* | device: accept NULL plinkBeniamino Galvani2017-08-051-2/+4
| | | | | | | | | | For PPP devices we can't create a link in advance, as the link is created by pppd when the connection is established.
* | core: device-factory: implement match_connection()Beniamino Galvani2017-08-054-27/+74
| | | | | | | | | | | | | | | | | | Make it possible to register different factories for the same setting type, and add a match_connection() method to let each factory decide if it's capable of handling a connection. This will be used to decide whether a PPPoE connection must be handled through the legacy Ethernet factory or through the new PPP factory.
* | device: add NMDevicePPPBeniamino Galvani2017-08-056-3/+143
| | | | | | | | | | | | The new device type represents a PPP interface, and will implement the activation of new-style PPPoE connections, i.e. the ones that don't claim the parent device.
* | platform: add nm_platform_link_set_name()Beniamino Galvani2017-08-053-0/+50
| | | | | | | | We'll need it to rename the new PPP interface to a given name.
* | device: ethernet: remove unused private memberBeniamino Galvani2017-08-051-6/+0
| |
* | platform: extend API for adding routesThomas Haller2017-08-039-105/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Via the flags of the RTM_NEWROUTE netlink message, kernel and iproute2 support various variants to add a route. - ip route add - ip route change - ip route replace - ip route prepend - ip route append - ip route test Previously, our nm_platform_ip4_route_add() function was basically `ip route replace`. In the future, we should rather user `ip route append` instead. Anyway, expose the netlink message flags in the API. This allows to use the various forms, and makes it also more apparent to the user that they even exist.
* | platform,libnm: cleanup handling of TOS for routesThomas Haller2017-08-036-31/+34
| | | | | | | | | | | | | | | | | | | | - kernel ignores rtm_tos for IPv6 routes. While iproute2 accepts it, let libnm reject TOS attribute for routes as well. - move the tos field from NMPlatformIPRoute to NMPlatformIP4Route. - the tos field is part of the weak-id of an IPv4 route. Meaning, `ip route add` can add routes that only differ by their TOS.
* | ifcfg-rh: fix writing/reading TOS for routes in hexadecimalThomas Haller2017-08-032-2/+2
| | | | | | | | | | | | iproute2 expects TOS in hex. This is a change in behavior.
* | core: implement NMIP4Config's and NMIP6Config's route equality based on ↵Thomas Haller2017-08-033-8/+25
| | | | | | | | | | | | | | | | | | | | | | nm_platform_ipx_route_cmp() There are various notions of how to compare routes. Collect them all in nm_platform_ip4_route_cmp(), nm_platform_ip4_route_hash(), nm_platform_ip6_route_cmp(), and nm_platform_ip6_route_hash(). This way, we have them side-by-side, which makes the differences more discoverable.
* | platform: cleanup handling metric paramters for non-exclusive routesThomas Haller2017-08-033-32/+33
| |
* | platform: cleanup handling locks for non-exclusive routesThomas Haller2017-08-033-30/+39
| |
* | platform: print lock paramters of routeThomas Haller2017-08-031-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is valid to set "lock" for a property with numeric value 0. # ip route append 192.168.7.0/24 dev bond0 window lock 0 # ip route append 192.168.7.0/24 dev bond0 window 0 # ip route append 192.168.7.0/24 dev bond0 window lock 10 # ip route append 192.168.7.0/24 dev bond0 window 10 # ip -4 -d route show dev bond0 unicast 192.168.7.0/24 proto boot scope link linkdown unicast 192.168.7.0/24 proto boot scope link linkdown unicast 192.168.7.0/24 proto boot scope link linkdown window lock 10 unicast 192.168.7.0/24 proto boot scope link linkdown window 10 Our to-string methods should accurately print the content of the routes. Note that iproute2 fails to do so too.
* | platform: cleanup handling "window" for non-exclusive routesThomas Haller2017-08-033-14/+26
| |
* | platform: use route src/src_plen when deleting IPv6 routeThomas Haller2017-08-033-18/+39
| |
* | platform: use route pref_src when deleting IP routeThomas Haller2017-08-033-8/+20
| |
* | platform: use route mss when deleting IP routeThomas Haller2017-08-033-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mss (advmss, RTA_METRICS.RTAX_ADVMSS) is in a way part of the ID for IPv4 routes. That is, you can add multiple IPv4 routes, that only differ by mss. On the other hand, that is not the case for IPv6. Two IPv6 routes that only differ by mss are considered the same. Another issue is, that you cannot selectively delete an IPv4 route based on the mss: ip netns del x ip netns add x IP() { ip netns exec x ip "$@" } IP link add type veth IP link set veth0 name v IP link set veth1 up IP link set v up IP route append 192.168.7.0/24 dev v advmss 6 IP route append 192.168.7.0/24 dev v advmss 7 IP -d route show dev v IP route delete 192.168.7.0/24 dev v advmss 7 IP -d route show dev v It seems for deleting routes, kernel ignores mss (which doesn't really matter for IPv6, but does so for IPv4).
* | platform: use correct gateway for deleting routeThomas Haller2017-08-033-9/+19
| | | | | | | | | | Routes may only differ by their gateway. When deleting a route, we must specify the exact gateway to delete.
* | platform: use correct scope for deleting IPv4 routeThomas Haller2017-08-033-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor _nl_msg_new_route() to obtain the route scope (rtm_scope) from the NMPObject, instead of a separate argument. That way, when deleting an IPv4 route, we don't pick the first route that matches (RT_SCOPE_NOWHERE), but use the actual scope of the route that we want to delete. That matters, if there are more then one otherwise identical routes that only differ by their scope. For kernel, the scope of IPv6 routes is always global (RT_SCOPE_UNIVERSE). Also, during ip4_route_add() initialize the intermediate @obj to have the values as we expect them after adding the route. That is necessary to use it in _nl_msg_new_route(). But also nicer for consistency. Also, move the scope_inv field in NMPlatformIP4Route to let the other in_addr_t fields life side by side.
* | platform: use proper rt_source of route for add and deleteThomas Haller2017-08-033-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | _nl_msg_new_route() should not get extra arguments, but instead use all parameters from the NMPObject argument. This will allow during nm_platform_ip_route_delete() to pick the exact route that should be deleted. Also, in ip4_route_add()/ip6_route_add(), keep the stack-allocated @obj object consistent with what we expect to add. That is, set the rt_source argument to the value of what the route will have after kernel adds it. That might be necessary, because do_add_addrroute() searches the cache for @obj.
* | platform: drop duplicate cmd_obj_stackinit_id() virtual functionThomas Haller2017-08-032-40/+3
| | | | | | | | It can be implemented solely based on cmd_plobj_id_copy().
* | platform: add compare functions for routes with different compare semanticsThomas Haller2017-08-0311-178/+310
| | | | | | | | | | | | | | | | | | | | Routes are complicated. `ip route add` and `ip route append` behaves differently with respect to determine whether an existing route is idential or not. Extend the cmp() and hash() functions to have a compare type, that covers the different semantics.
* | core: add nm_utils_ip6_address_same_prefix_cmp() helperThomas Haller2017-07-312-18/+37
| | | | | | | | Useful for sorting/comparing.
* | shared: cleanup NM_CMP_*() macrosThomas Haller2017-07-311-26/+26
| |
* | shared: move NM_CMP_*() helper macros to shared headerThomas Haller2017-07-311-75/+0
| |
* | platform/trivial: rename cmp helper macrosThomas Haller2017-07-311-221/+221
| |
* | platform: fix failed assertion with cloned routeBeniamino Galvani2017-07-311-3/+5
| | | | | | | | | | | | | | platform-linux: event-notification: NEWROUTE, seq 5: fd02::2/128 via fd01::1 dev 17 metric 0 mss 0 rt-src rt-unspec src ::/0 cloned mtu 1400 NetworkManager:ERROR:src/platform/nmp-object.h:614:ASSERT_nmp_cache_ops: assertion failed: (obj_old || obj_new) Fixes: 9440eefb6dc4939752bf049d1669a0a4d37213c2
* | ppp: fix generation of IP config received from pppdBeniamino Galvani2017-07-281-15/+15
| | | | | | | | | | | | | | | | Since commit 22edeb5b691b ("core: track addresses for NMIP4Config/NMIP6Config via NMDedupMultiIndex"), addresses can be added to a IP config only after the ifindex has been set. Fixes: 22edeb5b691befd796c534cf71901b32f0b7945b
* | core: fix IPv6 address lookupBeniamino Galvani2017-07-271-1/+1
| | | | | | | | Fixes: 22edeb5b691befd796c534cf71901b32f0b7945b
* | platform: fix IPv4 secondary address detectionBeniamino Galvani2017-07-271-2/+2
| | | | | | | | | | | | | | If the subnet index was built without the @full_index flag, secondary addresses are not present in the hash table. Fixes: 5fcca9ba3e37152b9fbe645a8436cacbcf846dc5
* | bridge: introduce a bridge.group-forward-mask connection propertyBeniamino Galvani2017-07-275-1/+17
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1358615
* | platform: fix IPv4 address lookup in nm_platform_ip4_address_sync()Beniamino Galvani2017-07-261-2/+2
| | | | | | | | Fixes: 5fcca9ba3e37152b9fbe645a8436cacbcf846dc5
* | device: don't set a fake permanent hardware addressBeniamino Galvani2017-07-261-2/+11
| | | | | | | | | | | | | | | | | | | | | | Software devices don't have a permanent hardware address and thus it doesn't make sense to enforce the 'fake' (generated) permanent one when cloned-mac-address=permanent. Also, setting the fake permanent address on bond devices, prevents them from inheriting the first slave hardware address, so let's just skip the setting of MAC when cloned-mac-address=permanent and there is no real permanent address. https://bugzilla.redhat.com/show_bug.cgi?id=1472965
* | device: deprecate "bridge.mac-address" for "ethernet.cloned-mac-address" settingThomas Haller2017-07-251-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | The settings "bridge.mac-address" and "ethernet.cloned-mac-address" have an overlapping meaning. If the former is unset, fallback to the latter. Effectively, "bridge.mac-address" is deprecated in favor of "ethernet.cloned-mac-address", which is more powerful as it supports various modes like "stable". However, if a connection specifies "bridge.mac-address", it is used when creating the bridge interface, while "ethernet.cloned-mac-address" is used shortly after, during activation.
* | platform: consolidate debug logging during link-addThomas Haller2017-07-252-5/+15
| | | | | | | | | | Don't log both in NMPlatform and NMLinuxPlatform. Also, log all provided arguments.
* | device: fix address check in start_sharing()Beniamino Galvani2017-07-251-1/+1
| | | | | | | | Fixes: 22edeb5b691befd796c534cf71901b32f0b7945b
* | core: emit notify signals for addresses/routes in nm_ipX_config_replaceBeniamino Galvani2017-07-252-0/+4
| | | | | | | | | | | | Fixes: 22edeb5b691befd796c534cf71901b32f0b7945b Fixes: 935411e5c03dcb62d5b2a85e67bf3220c75d0f5e Fixes: cfd1851c0067773211524c2b648330b6ee7a066c
* | core: fix setting output argument in nm_utils_stable_id_parse()Thomas Haller2017-07-251-1/+1
| | | | | | | | | | | | | | This bug has no consequences, as the only caller already initialized the output variable to NULL. Fixes: f0d40525dfb079820e5dce48360ef6a9a540064a
* | platform: nmp-object: fix memory leakBeniamino Galvani2017-07-251-1/+1
| | | | | | | | Fixes: 9440eefb6dc4939752bf049d1669a0a4d37213c2
* | core: prevent invalid routes in NMIP4Config/NMIP6ConfigThomas Haller2017-07-257-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Kernel requires that the host part of a route (based on network/plen) is zero. Routes with non-zero host part don't really exist. In settings (NMIPRoute), we don't enforce that. Hence we must ensure that we don't let such invalid routes into NMIP4Config/NMIP6Config. Also at other places where we obtain routes from untrusted sources, we must sanitize them first. Also add an assertion to catch such bugs.
* | core: allow omitting @src argument in nm_utils_ip6_address_clear_host_address()Thomas Haller2017-07-251-2/+4
| | | | | | | | | | | | | | | | | | For convenience, to clear the address inplace, allow to leave @src NULL, instead of requiring to set @src to @dst. The only problem is, if you make use of this extended behavior and later backport the use to an older branch, ensure that you cherry-pick this commit too. That is easy to miss, but you are testing the backport, right?
* | core: simplify NMDedupMultiIter by storing CList pointerThomas Haller2017-07-252-25/+18
| | | | | | | | | | Let next and head pointers point to the CList value, instead of NMDedupMultiEntry.