summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libnm-util: skip linking test when address sanitizer is enabledbg/asan-bgo761429Beniamino Galvani2016-05-311-0/+8
| | | | | | | | The linking test causes a crash to check whether libnm and libnm-util are both linked. If abrt or systemd-coredump are enabled, the core dump processing will take a long time when the address sanitizer is enabled, due to the huge process address space. It seems a good choice to disable the test when NM was compiled with -fsanitize=address.
* build: add options to compile with address/undefined sanitizersBeniamino Galvani2016-05-315-4/+60
| | | | | | | This adds two new options to the configure scripts to compile NM, clients and libraries with the address and undefined-behavior sanitizers available in recent GCC versions. Clang is not supported at moment.
* libnm-core/tests: fix memory leakBeniamino Galvani2016-05-311-1/+1
|
* ifupdown/tests: fix memory leaksBeniamino Galvani2016-05-312-2/+4
| | | | Fix memory leaks in tests for the ifupdown plugin and re-enable valgrind.
* ifnet: fix memory leaksBeniamino Galvani2016-05-316-9/+28
| | | | | Fix memory leaks in ifnet plugin and tests, and re-enable valgrind for tests.
* platform/tests: fix memory leaksBeniamino Galvani2016-05-311-9/+24
|
* build: configure.ac: always set -fno-strict-aliasingBeniamino Galvani2016-05-312-1/+6
| | | | | | We break the aliasing rules in the code, and thus the flag should always be enabled to prevent wrong optimizations, even without --enable-more-warnings.
* build: configure.ac: replace NM_COMPILER_FLAG with CC_CHECK_FLAG_APPENDBeniamino Galvani2016-05-311-7/+11
|
* build: import attributes.m4 from systemdBeniamino Galvani2016-05-311-0/+292
| | | | | | It contains useful macros for determining compiler support for flags/attributes. We already similar macros in compiler_options.m4, but the plan is to replace them.
* dhcp: let users override FQDN dhclient optionsBeniamino Galvani2016-05-312-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | When the ipv4.dhcp-fqdn property is set, NM adds the following options to dhclient.conf: send fqdn.fqdn "foo.bar"; send fqdn.encoded on; send fqdn.server-update on; which enable the S (server-update) and E (encoded) flags in DHCP option 81, since they are sensible default values and dhclient requires a "send fqdn.server-update [on|off]" directive in order to send the option. Users may want to change these flags according to their server's configuration, but this is not possible at the moment since NM options are placed after user's ones, overriding them. To fix this, collect user's fqdn options and add them after NM configuration; note that the fqdn.fqdn option still can't be overridden by users, as NM must control the FQDN sent to server. Fixes: c3573ebf2bb4958ee2ebf08e7ebac351765b92ef
* merge: merge branch systemd into masterThomas Haller2016-05-3118-474/+558
|\
| * systemd: update code from upstreamThomas Haller2016-05-3116-469/+553
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2016-05-31, git commit b76e4ebe1065ba56ab02b2356bf7680f54846aca. ====== SYSTEMD_DIR=../systemd COMMIT=b76e4ebe1065ba56ab02b2356bf7680f54846aca ( 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/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/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"
* | libnm-core: fix comparison of team configurationBeniamino Galvani2016-05-312-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMSettingTeam implements a custom compare_property() method in order to perform a relaxed matching on team configurations when it is necessary to assume a connection. However, the method is called also when the core needs to check if a connection has changed before an update. In that case it is better to use the default string comparison on the property, otherwise the second of these commands would not have effect: $ nmcli connection modify team0 team.config '' $ nmcli connection modify team0 team.config '{ }' because compare_property() returns TRUE. Use the @flags argument to distinguish the two cases. Fixes: 82f8a54854f65d2bf648329d1d9b411de04959cb
* | dhcp/dhclient: emit a warning if the DHCPv6 hostname is not a FQDNBeniamino Galvani2016-05-311-0/+3
| | | | | | | | | | | | | | | | | | | | RFC 4704 ("The DHCPv6 Client FQDN Option") allows both partial and fully-qualified names in the FQDN option, however dhclient always appends a terminating zero-length label to the name, so we ignore unqualified hostnames to prevent a wrong configuration. Emit a warning when the field is ignored so that users can clearly see why the hostname is not being sent.
* | libnm: export nm_setting_ip6_config_get_token() symbolBeniamino Galvani2016-05-301-0/+1
| | | | | | | | Fixes: 954d937b2f6bfe5a513497c6ea13d0651a0c0b16
* | device: reconfigure IP addressing after bringing up deviceThomas Haller2016-05-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | For changing the hardware address, we must bring the device down. When doing that, IP addressing is lost and it must be re-configured after bringing the device up again. We already do something similar in device_link_changed(), but that might not be sufficient, because device_link_changed() is run on an idle handler, thus, while changing the hardware address it has no chance to run (or notice that the device was shortly down). https://bugzilla.redhat.com/show_bug.cgi?id=1309899
* | merge: branch 'lr/connection-token'Lubomir Rintel2016-05-3019-99/+437
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=765851
| * | device: accept failure to lookup link in get_ip_iface_identifier()lr/connection-tokenThomas Haller2016-05-301-2/+4
| | | | | | | | | | | | | | | An assertion seems a bit harsh, especially, because the platform cache cannot be always in sync with the device state.
| * | device: lookup platform data only once in get_ip_iface_identifier()Thomas Haller2016-05-301-11/+10
| | | | | | | | | | | | No need to perform multiple cache lookups.
| * | device: set the iid to rdisc from connection's propertyLubomir Rintel2016-05-301-10/+51
| | | | | | | | | | | | | | | ...as opposed to directly from the platform. If the token was set in platform, it was picked up when generating a connection anyway.
| * | device: use the token set in platform when generating a connectionLubomir Rintel2016-05-301-0/+10
| | |
| * | platform: add capability to set the tokenized interface identifierLubomir Rintel2016-05-303-5/+54
| | | | | | | | | | | | | | | | | | We don't need the token set in platform for our address mode generation, but having it set makes it possible to correctly generate and assume connections that use tokens.
| * | cli: add ipv6.token supportLubomir Rintel2016-05-301-1/+12
| | |
| * | setting-ip6-config: add token propertyLubomir Rintel2016-05-305-4/+142
| | |
| * | platform: use utility functionality to stringify linkLubomir Rintel2016-05-301-10/+2
| | |
| * | platform: remove nm_platform_link_get_ipv6_token()Thomas Haller2016-05-303-38/+8
| | | | | | | | | | | | No need for the extra cache lookup.
| * | platform: remove unnecessary NMPlatformLink.inet6_token.is_valid fieldThomas Haller2016-05-303-29/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only user of platform who accesses this field is NMDevice, when calling nm_platform_link_get_ipv6_token(). It cares more about whether the token is all-zero or set to something. Another use of inet6_token.is_valid was so that when we receive a netlink message without IFLA_INET6_TOKEN attribute, that we don't treat the value as zero, although it is just unknown. Fix that instead in a better way by setting the value from the cache, if IFLA_AF_SPEC doesn't provide it. Also, when printing the token in nm_platform_link_to_string() treat it as an IPv6 address (inet_ntop).
| * | core-utils: add conversions of ipv6 tokensLubomir Rintel2016-05-304-6/+122
| | | | | | | | | | | | From/to strings and interface identifiers.
| * | linux: use the utility functionality to convert the token from platformLubomir Rintel2016-05-301-8/+1
| | |
| * | ifcfg-rh: drop IPV6_ADDR_GEN_MODE=stable-privacy when the mode is eui64Lubomir Rintel2016-05-301-0/+2
| | |
| * | all: fix the identfier typoLubomir Rintel2016-05-305-7/+7
| | |
| * | libnm-util: a trivial typoLubomir Rintel2016-05-301-1/+1
| | |
| * | all: trivial: use g_value_dup_string ()Lubomir Rintel2016-05-303-4/+4
| | |
* | | core: don't include dns-priority in IP configuration hashBeniamino Galvani2016-05-302-6/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DNS priority property of a IP configuration determines how the configuration compares to others when deciding their order, but doesn't specify directly parameters to be applied. In other words, two configurations which differs only for the dns-priority should have the same hash as applying them will give the same result. Especially, when the DNS manager computes the hash of IP configurations, the ones without real configuration data (servers, domans, options...) should not change the hash value. Thus, exclude the property from the hash computation and dowgrade any modification to 'minor change'. Fixes: bfabfb05ae642112b7fde23da0d78689c2046745 Fixes: f09f5e1ec84b1e8b0e6231f72655f6446ae4646a
* | dhcp: log setting and clearing systemd dhcp client instanceThomas Haller2016-05-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | internal systemd code produces logging messages by itself, like libsystemd: DHCP CLIENT (0x9204b5ce): ACK Let's log the pointer value initially, to associate the logged "xid" with the pointer value of the client. Now we get: <trace> [1464520695.7655] dhcp4 (enp0s25): dhcp-client4: set 0x556cdd9d6800 <debug> [1464520695.7658] libsystemd: DHCP CLIENT (0x9d87b7c5): STARTED on ifindex 2
* | dns: clear dnsmasq cache after an updateBeniamino Galvani2016-05-281-2/+29
| | | | | | | | | | | | | | | | | | When the list of DNS servers changes, old DNS entries cached by dnsmasq must be invalidated as the answers returned by new servers may be different (especially, old NXDOMAIN entries may now be valid). Call the dnsmasq "ClearCache" D-Bus method to achieve this. https://bugzilla.redhat.com/show_bug.cgi?id=1338731
* | dns/dnsmasq: cancel pending update on disposeBeniamino Galvani2016-05-281-5/+16
| | | | | | | | | | There might be a pending "SetServersEx" D-Bus call when the plugin is destroyed, ensure it gets canceled.
* | core: merge branch 'th/vpn-connection-dns-fix'Thomas Haller2016-05-274-31/+71
|\ \ | | | | | | | | | | | | | | | | | | nm-libreswan VPN has no own IP interface. Thus we got an assertion failure in nm_dns_manager_add_ip_config(). Fix that, by using the IP interface of the parent device.
| * | vpn,dns: for interface-less VPN connections get the ip_iface from the parent ↵Thomas Haller2016-05-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device Since 027f4c65ace4ad52ee9ccf4c1d9adad01eb67735, the ip_iface for nm_dns_manager_add_ip_config() must be set. Wit interface-less VPN types like libreswan, we thus hit the assertion nm_dns_manager_add_ip_config: assertion 'iface && iface[0]' failed Fix that, by fallback to the interface name of the parent device. Fixes: 027f4c65ace4ad52ee9ccf4c1d9adad01eb67735
| * | vpn-connection: add @fallback_device argument to ↵Thomas Haller2016-05-274-28/+60
| | | | | | | | | | | | | | | | | | | | | | | | nm_vpn_connection_get_ip_iface() and nm_vpn_connection_get_ip_ifindex(). For VPN types that have no own IP interface, we often want instead lookup the IP interface from the parent device.
| * | vpn-connection: ensure ip_iface and ip_ifindex are set togetherThomas Haller2016-05-271-3/+11
|/ / | | | | | | | | ip_iface and ip_ifindex come as a pair. They must be either set both, or not at all. Ensure that whenever setting one, the other is set too (or cleared).
* | dns/dnsmasq: use servers without split DNS if no domain was receivedBeniamino Galvani2016-05-261-2/+1
| | | | | | | | | | | | | | When a VPN server doesn't push any DNS domain, we want to use the received servers for all queries. https://bugzilla.gnome.org/show_bug.cgi?id=766769
* | team: expose current device configuration through D-Bus and nmcliBeniamino Galvani2016-05-267-23/+210
| | | | | | | | | | | | | | | | Add a new "Config" property to the D-Bus interface for team devices and show its value through "nmcli device show". The property contains the full JSON configuration from teamd for the device. https://bugzilla.redhat.com/show_bug.cgi?id=1310435
* | nm-device-wifi: add TURBONETT to no-roaming WiFi networksCosimo Cecchi2016-05-251-0/+1
| | | | | | | | | | | | | | TURBONETT is the default network name of a very popular internet provider in Guatemala, so roaming should be disabled. https://bugzilla.gnome.org/show_bug.cgi?id=766845
* | device: fix NM_DEVICE_GET_PRIVATE() macroBeniamino Galvani2016-05-251-1/+1
| | | | | | | | Fixes: adbba0fb395b9910c4615e7be91ffe5b3ef70d6a
* | platform: handle missing netlink attribute IFLA_ADDRESS by cache-lookupThomas Haller2016-05-252-17/+26
| | | | | | | | | | | | | | Sometimes the netlink event lacks the IFLA_ADDRESS attribute with the MAC address of the link. In this case, take the value from the cached link instance. A missing netlink attribute should have the meaning of reusing the previous value, not clearing the address.
* | logging,vpn: merge branch 'th/vpn-plugin-debug-bgo766816'Thomas Haller2016-05-244-8/+129
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=766816
| * | logging: print debug messages with syslog level LOG_DEBUGThomas Haller2016-05-241-1/+10
| | |
| * | vpn: set environment for VPN plugin to configure loggingThomas Haller2016-05-241-4/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce two environment variables to configure logging for the VPN plugins: - NM_VPN_LOG_LEVEL: when set, a syslog logging level (0-7). - NM_VPN_LOG_SYSLOG: either 0 or 1, whether the plugin should log to stdout or syslog. Basically, if NetworkManager itself runs in the forground, we also want that the plugin logs to stdout.
| * | logging: add new logging domain LOGD_VPN_PLUGINThomas Haller2016-05-243-3/+15
| | | | | | | | | | | | | | | | | | | | | This logging domain will be used to enable debugging of the VPN plugins. However, the plugins might expose sensitive data in this mode, so exclude the new domain from "LOGD_ALL".