summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* man: update the nmcli manual for new connection add syntaxlr/docsLubomir Rintel2016-05-302-1172/+433
| | | | | | | | | | It allows us to clean up the nmcli "c add" section considerably. We list the old-fashioned aliases in a separate section that applies to both "nmcli c add" and "nmcli c modify". The section is now nicely cross-linked with nm-settings in HTML rendering.
* man: turn the manual page cross-references into linksLubomir Rintel2016-05-309-54/+54
| | | | | | | | This improves the HTML rendering. But it also causes a lot of non-resolvable linkends warning when rendering a separate manual pages into roff/mman. The messages are harmless, but still a bit ugly.
* nmcli: streamline connection additionLubomir Rintel2016-05-302-3584/+984
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a huge refactoring in attempt to 1.) reduce the horrible redundancy in the connection addition path and 2.) reduce confusion between various sources of property value (command line, properties, interactive mode). * The conversions from the strings was done all over the place: settings.c already does for all sensible properties. The rest is removed. * The validations are done randomly and redundantly: server does some validation, and per-property client validations useful for interactive mode are done in settings.c The rest is removed. * The information about defaults and required options was redundantly scattered in per-type completion functions and interactive mode questionnaries. This is now driven by the option_info[] table. In general, we do our best to just map the command line options to properties and allow mixing them. For the rest there's the check_and_set() callbacks (basically to keep compatibility with previous nmcli versions). This this is now all possible: $ nmcli c add type ethernet ifname '*' This always worked $ nmcli c add type bond-slave save no -- connection.autoconnect no The "save" and "--" still work $ nmcli c add connection.type ethernet ifname eth0 Properties can now be used $ nmcli c add type ethernet ip4 1.2.3.4 mac 80:86:66:77:88:99 con-name whatever There's no implementation mandated order of the properties (the type still must be known to determine which properties make sense) $ nmcli --ask c add type ethernet ip4 1.2.3.4 mac 80:86:66:77:88:99 con-name whatever The interactive mode asks only for properties that weren't specified on command line
* shared: backport g_strv_contains()Lubomir Rintel2016-05-301-0/+30
|
* 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".
| * logging: add nm_logging_syslog_enabled() functionThomas Haller2016-05-242-0/+10
| | | | | | | | | | We want to know, whether running in debug-mode (logging to stdout) or whether we log to syslog.
| * logging: add nm_logging_get_level() functionThomas Haller2016-05-242-0/+23
|/
* device: replace static zero_hwaddr by nm_ip_addr_zero.addr_ethThomas Haller2016-05-242-4/+2
| | | | | Instead of defining multiple all-zero-ethernet-address variables, use nm_ip_addr_zero.addr_eth.
* platform: reuse nm_ip_addr_zero for a all-zero ethernet MAC addressThomas Haller2016-05-241-0/+5
|
* platform: refactor comparing for all-zero,all-ones MAC address in ↵Thomas Haller2016-05-241-11/+15
| | | | | | | | | nmp_utils_ethtool_get_permanent_address() Don't like the static fields. Also, don't assert against return values from the ethtool call. And check that the length is positive.
* ifcfg-rh: avoid creating temporary string prefix for svGetValueFull()Thomas Haller2016-05-241-7/+4
|
* core: merge branch 'th/drop-connection-provider-bgo766560'Thomas Haller2016-05-2429-547/+367
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=766560
| * core: drop NMConnectionProvider and use NMSettings directlyThomas Haller2016-05-245-280/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not C# but glib. Using interfaces is so cumbersome, that they don't simplify code but make it more complicated. E.g. following signals and its subscribers is complicated enough. It gets more complicated by having NM_SETTINGS_SIGNAL_CONNECTION_ADDED and NM_CP_SIGNAL_CONNECTION_ADDED. Of course, your favorite IDE has no idea about glib interfaces, so figuring out who calls who gets more complicated. This undoes commit 4fe48b1273cff8dde3688a1dc4b7bcbf0a9e16f4. Originally, NMConnectionProvider had only one function get_best_connection(). But it kept growing and more functions were added. If we want to ~hide~ certain part of the NMSettings API, we should move them to a separate header which gives internal access.
| * core: drop interface function nm_connection_provider_get_best_connections()Thomas Haller2016-05-245-80/+58
| | | | | | | | ... in favor of nm_settings_get_best_connections().
| * device: use NMSettings directly instead of NMConnectionProvider in subclassesThomas Haller2016-05-2411-51/+78
| | | | | | | | | | | | Instead of accessing the singleton getter nm_settings_get(), obtain the settings instance from the device instance itself via nm_device_get_settings().
| * device: use NMSettings directly instead of NMConnectionProviderThomas Haller2016-05-242-60/+71
| |
| * bluez: use NMSettings directly instead of NMConnectionProviderThomas Haller2016-05-2410-68/+75
| |