summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ifcfg-rh/tests: add ipv6 hostname legacy support read testfg/dhcp_hostname_oldFrancesco Giudici2016-12-123-0/+29
|
* ifcfg-rh: add DHCPV6_HOSTNAME and DHCPV6_SEND_HOSTNAME varsFrancesco Giudici2016-12-123-7/+34
| | | | | | | Currently ipv4 and ipv6 settings share the ifcfg plugin vars for the dhcp-hostname and dhcp-send-hostname options (DHCP_HOSTNAME and DHCP_SEND_HOSTNAME). Add brand new vars DHCPV6_HOSTNAME and DHCPV6_SEND_HOSTNAME to have var-property one to one mappings.
* trivial: fix indentationFrancesco Giudici2016-12-091-1/+1
|
* device: fix activation_source_schedule() for rescheduling the same functionThomas Haller2016-12-081-1/+1
| | | | Fixes: 78ca961c0fd0e5b563e33306299bd1058fa2e289
* proxy: stricter validate the proxy pac script in NMSettingProxyThomas Haller2016-12-061-7/+25
|
* ppp: merge branch 'bg/ppp-manager-split-bgo773482-squashed'Beniamino Galvani2016-12-0618-180/+565
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=773482
| * contrib/rpm: split PPP support into a separate packageBeniamino Galvani2016-12-061-4/+25
| | | | | | | | This allows to remove from the main package the PPP dependency.
| * ppp: split ppp manager into a pluginBeniamino Galvani2016-12-0615-83/+408
| | | | | | | | | | | | | | | | Moving the PPP manager to a separate plugin that is loaded when needed has the advantage of slightly reducing memory footprint and makes it possible to install the PPP support only where needed. https://bugzilla.gnome.org/show_bug.cgi?id=773482
| * core: factor out plugin validationBeniamino Galvani2016-12-062-11/+39
| | | | | | | | The new function will be used to validate other plugins we load.
| * core: move plugin path reading function to nm-core-utils.cBeniamino Galvani2016-12-063-93/+104
|/ | | | | Even if it's called only from one place, it can be considered an utility function.
* contrib/travis: the test outputs are now logged more sanelyLubomir Rintel2016-12-051-1/+1
| | | | Adjust the travis script accordingly.
* contrib/rpm: mark the config packages noarchLubomir Rintel2016-12-051-0/+2
|
* core: merge branch 'bg/ip-order-rh1394500'Beniamino Galvani2016-12-057-99/+278
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1394500
| * platform: fix the order of addition of primary and secondary IPv4 addressesBeniamino Galvani2016-12-051-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>
| * ip6-config: sort addresses only when reading the property valueBeniamino Galvani2016-12-052-4/+7
| | | | | | | | | | Don't change the address order from configuration, but instead sort addresses just before returning them to clients.
| * ip6-config: add nm_ip6_config_set_privacy()Beniamino Galvani2016-12-054-10/+31
| |
| * ip6-config: cache addresses variantsBeniamino Galvani2016-12-051-21/+38
| |
| * ip4-config: sort addresses only when reading the property valueBeniamino Galvani2016-12-053-35/+6
| | | | | | | | | | Don't change the address order from configuration, but instead sort addresses just before returning them to clients.
| * ip4-config: cache addresses variantsBeniamino Galvani2016-12-051-18/+37
| |
| * ip4-config: don't change order of addresses in the same subnetBeniamino Galvani2016-12-051-4/+11
|/ | | | | | | | | | | | | | | | When multiple address are assigned to an interface and the kernel must decide which one should be used to communicate with a given IP, it chooses the most specific one in the same subnet as the destination. In case there are multiple addresses in the same subnet, the primary address is choosen, which is basically the first one that was added. With commit 719742513705 ("device: expose NMIP4Config:addresses in stable/defined sort order") we sorted all the addresses before committing the configuration, with the side effect that the order no longer respected the one in the user configuration. Instead, change the sort function to keep the subnet order unchanged.
* cli: the 'networking' command needs a client and NM runningBeniamino Galvani2016-12-051-1/+1
| | | | Fixes: 01a20015e0bfd6d7c9aa872cfa31c4642ccb6825
* platform: increase initial buffer size of libnl's nl_recvmsg() to 32KThomas Haller2016-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 9fafb382db273160a5e9e10ff84f8a4d2af220d3, we would explicitly set libnl's socket buffer size to 4*getpagesize(). That is also the default of libnl itself. Additionally, we would workaround too small buffers by increasing the buffer size up to 512K. A too small buffer causes messages to be lost. Usually, that only results in a cache-resync, which isn't too bad. Lost messages are however a problem if the lost message was an ACK that we were waiting for. However, it is rather unlikely to happen, because it's expected that the buffer size gets adjusted already when the cache is filled initially, before any other requests are pending. Still, let's increase the default buffer size to 32K, hoping that this initial value is already large enough to avoid the problem altogether. Note that iproute2 also uses a buffer size of 32K [1] [2]. Alternatively, we could use MSG_PEEK like systemd does [3]. However, that requires two syscalls per message. [1] https://patchwork.ozlabs.org/patch/592178/ [2] https://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/tree/lib/libnetlink.c?id=f5f760b81250630da23a4021c30e802695be79d2#n274 [3] https://github.com/systemd/systemd/blob/cd66af227416eb7b9f150b92abff4e4a3e92253b/src/libsystemd/sd-netlink/netlink-socket.c#L323
* device: allow device reapply of a connection with differing ↵Thomas Haller2016-12-011-0/+1
| | | | | | | | connection.autoconnect Autoconnect property doesn't really matter for the applied connection. Whitelist it from the properties and allow changing it during reapply.
* platform: don't use static temporary cache_idThomas Haller2016-12-013-12/+16
| | | | | | This only saves some typing at a few places. In general, avoid static variables, so drop it in favor of a stack-allocated cache_id.
* libnm-core/man: add a warning on static link negotiation parameterspoma2016-12-011-0/+2
| | | | | | | | | When disabling link autonegotiation and setting speed and duplex manually, the user is alone: no check is performed against supplied values. So, the user is supposed to check that the device supports those values. Explicit this in nm-settings man page. [fgiudici@redhat.com: added the commit message]
* platform: workaround NLE_MSG_TRUNC failure of nl_recv() with too small ↵Thomas Haller2016-11-301-1/+34
| | | | | | | | | | buffer size We don't want to enable MSG_PEEK due to the overhead. But when we detect that we just lost a message due to MSG_TRUNC, increase the buffer size and retry. See-also: https://github.com/thom311/libnl/commit/55ea6e6b6cd805f441b410971c9dd7575e783ef4
* dns: merge branch 'bg/dnsmasq-clear-cache-option'Beniamino Galvani2016-11-301-29/+3
|\ | | | | | | https://mail.gnome.org/archives/networkmanager-list/2016-November/msg00095.html
| * Revert "dns: clear dnsmasq cache after an update"bg/dnsmasq-clear-cache-optionBeniamino Galvani2016-11-291-29/+2
| | | | | | | | | | | | | | We now pass the --clear-on-reload option to dnsmasq, so the manual clear is no longer needed. This reverts commit 4feb58b50b9fd6caceda83bab907ad107ad8ed01.
| * dns: tell dnsmasq to clear cache on servers reloadChristian Hesse2016-11-291-0/+1
|/ | | | | | | A new DNS may have different data for us. So tell dnsmasq to automatically clear the cache when servers change. Signed-off-by: Christian Hesse <mail@eworm.de>
* build: fix compilation with Python3mirh2016-11-291-2/+2
| | | | | | | | | has_key() has long been dropped https://docs.python.org/3.1/whatsnew/3.0.html#builtins Should still work with anything from 2.3 onwards https://github.com/NetworkManager/NetworkManager/pull/11
* manager: fix state transition on resuming from sleepBeniamino Galvani2016-11-291-3/+13
| | | | | | | | | | | | | | | | When going to sleep, we unmanage devices setting the unmanaged flags immediately but delaying the state transition (because we do it from another state transition). The signal handler can be executed after the wake and, especially, after we have already re-managed the device, making the device unmanaged again. Detect such situation and force the state to UNMANAGED (which will also clear any pending state change), so that later we manage the device again and it will try to activate any available connection. Fixes: 81ea812362de2757979e2c675774fc445400c59f https://bugzilla.redhat.com/show_bug.cgi?id=1382526
* build: merge branch 'th/build-without-gtk-doc'Thomas Haller2016-11-285-25/+26
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=775003
| * build: fix gtk-doc/introspection handling for buildThomas Haller2016-11-285-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `make dist` requires --enable-gtk-doc --enable-introspection --with-libnm-glib - --enable-gtk-doc requires --enable-introspection - --with-nmcli requires either --enable-introspection or pregenerated settings-docs.c files from the dist tarball. It does not require --enable-gtk-doc. There is a bit of a problem in that --enable-introspection requires now xsltproc. However, gobject-introspection does itself not depend on xsltproc. So, more correct might be a special --enable-doc argument, that combines --enable-introspection --with-xsltproc. Anyway, that seems to make it more complicated then it already is so just implicitly (and surprisingly?) require xsltproc with --enable-introspection. https://bugzilla.gnome.org/show_bug.cgi?id=775003
| * build: do not require GTK-Doc to build nmcliEmmanuele Bassi2016-11-282-12/+8
|/ | | | | | | We can simply check for xsltproc and depend on pygobject and introspection. https://bugzilla.gnome.org/show_bug.cgi?id=775003
* po: update Polish (pl) translation (bgo #775181)Piotr Drąg2016-11-281-695/+709
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775181
* libnm: force unsigned integer comparisong in nm_utils_bin2hexstr()Thomas Haller2016-11-281-1/+1
| | | | | | Not really a big issue, without the case the intergers would be compared as ssize_t, which is large enough for final_len, but possibly not for buflen.
* libnm: merge branch 'th/str2bin-cleanup'Thomas Haller2016-11-282-124/+115
|\ | | | | | | Merge the different bin2str/str2bin implementations.
| * libnm: merge hwaddr_aton() and nm_utils_hexstr2bin()Thomas Haller2016-11-282-45/+52
| | | | | | | | | | Have nm_utils_hexstr2bin() take over the allocated buffer via g_bytes_new_take().
| * libnm/trivial: rename internal function _bin2str()Thomas Haller2016-11-281-5/+5
| |
| * libnm: drop _bin2str() utilThomas Haller2016-11-271-15/+10
| | | | | | | | It was only used by two places, inline it.
| * libnm: implement nm_utils_bin2hexstr() via _bin2str_buf()Thomas Haller2016-11-271-26/+15
| |
| * libnm/trivial: move codeThomas Haller2016-11-271-77/+77
|/
* main: fix compiler warning about uninitialized auto variable in _init_nm_debug()Thomas Haller2016-11-251-1/+1
| | | | Fixes: c7d2e1f3bc97f7061e3d0e8d20027513919adb26
* libnm-core: make normalizable ethernet_link properties _VERIFY_NORMALIZABLEFrancesco Giudici2016-11-251-4/+6
| | | | | | | declassify bad combinations of auto-negotiate, duplex and speed properties values from _VERIFY_NORMALIZABLE_ERRORS to _VERIFY_NORMALIZABLE. This would preserve compatibility with legacy nm-connection-editors.
* config: merge branch 'th/config-rh1397938'Thomas Haller2016-11-2518-153/+162
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1397938
| * config: drop nm_config_get_debug() and access config directlyThomas Haller2016-11-253-17/+10
| |
| * config: drop nm_config_get_dhcp_client() and access config directlyThomas Haller2016-11-2510-49/+73
| | | | | | | | | | | | | | | | | | | | | | | | Also, ifnet plugin would read the configuration value, which is just wrong because: - the configuration might not be set and ifnet would fail to fallback to the compile time default. - the configuration only is in effect if the plugin is also available. Otherwise, we fallback to the next plugin. Only the dhcp-manager knows which DHCP plugin is in use.
| * config: drop nm_config_get_auth_polkit() and access value directlyThomas Haller2016-11-254-22/+11
| |
| * config/trivial: unify name of compile time config defaultsThomas Haller2016-11-259-38/+38
| |
| * config: fix config merging default value for main.pluginsThomas Haller2016-11-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit fb2ca0ce3d we would no longer pre-set the main.plugins value in NMConfig's keyfile to recognize unset default settings. This breaks with [main] plugins+=foo which now results in main.plgin=foo while previously it would have extended the compile time default. https://bugzilla.redhat.com/show_bug.cgi?id=1397938 Fixes: fb2ca0ce3dadae8154d2ad8b611538323be137ac