summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | secret-agent-simple: pass hints to the auth dialogLubomir Rintel2019-04-031-0/+9
| | |
| * | secret-agent-simple: get rid of an extra variableLubomir Rintel2019-04-031-3/+1
| | |
| * | secret-agent-simple: replace a char array with a GPtrArrayLubomir Rintel2019-04-031-13/+19
|/ / | | | | | | This will make it easier to dynamically add more options.
* | Revert "all: goodbye libnm-glib"Lubomir Rintel2019-04-03214-11/+74760
| | | | | | | | | | | | We need this for a little little longer :( This reverts commit 1de8383ad9fdfc8f552117e5d109bdfa7005634b.
* | shared: better implement compat version of explicit_bzero()Thomas Haller2019-04-021-6/+13
| | | | | | | | | | | | | | | | | | | | | | If we don't have explicit_bzero(), try a bit harder and use a volatile pointer. This is also what libsecret's egg_secure_clear() does [1]. However, for us this is less important, because commonly we expect glibc to provide a useable explicit_bzero(). [1] https://gitlab.gnome.org/GNOME/libsecret/blob/b5442654d483e959ac9ecd3a3fb9eebc8d9d8399/egg/egg-secure-memory.c#L1352
* | Update connectivity value on device removalAntonio Larrosa2019-04-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device is removed (like when the user unplugs a usb network device) the device object is removed, so it doesn't emit a notify signal for a change in its connectivity and so, device_connectivity_changed is not called. This means that nobody updates the global connectivity value which is potentially wrong if the device was the one providing network connectivity. Since device_connectivity_changed's first two parameters aren't actually used and are there just for the signal to be able to be connected, I moved the code from device_connectivity_changed to a new update_connectivity_value function that just takes a NMManager parameter and also call it from remove_device. [thaller@redhat.com: fix coding style regarding whitespace] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/141 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/101
* | po: update Italian (it) translationMilo Casagrande2019-04-021-3677/+3681
| | | | | | | | | | | | | | * Fixed translation errors. * Completed untranslated strings. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/102
* | ifupdown: fix connection iteratorYupeng Chang2019-04-021-1/+1
| | | | | | | | | | | | | | Fixes: 6aa66426a416 ('settings/ifupdown: merge eni_ifaces and connections hashes in plugin') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/145 https://bugzilla.redhat.com/show_bug.cgi?id=1694912
* | clients: only ask secrets for settings that require themBeniamino Galvani2019-04-026-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | When nmcli needs secrets for a connection it asks them for every known setting. nmtui is a bit smarter and asks them only for settings that actually exist in the connection. Make a step further and let clients ask secrets only for setting that exist *and* have any secret property. This decreases the number of D-Bus calls when editing or showing a connection with secrets. https://bugzilla.redhat.com/show_bug.cgi?id=1506536 https://github.com/NetworkManager/NetworkManager/pull/327
* | cli: fix a crash on "nmcli d wifi hotspot"Lubomir Rintel2019-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | Call the correct _finish() function for nm_client_add_and_activate_connection_async(). add_and_activate_cb() somewhat confusingly alternates between two different ones depending on whether info->create is set. Fixes: 35932375272a ('cli: reuse connections in nmcli dev wifi con') https://github.com/NetworkManager/NetworkManager/pull/326
* | libnm-core: fix memory leak in setting testBeniamino Galvani2019-03-311-0/+1
| | | | | | | | Fixes: 7fb23b0a62a0 ('libnm: add NMIPRoutingRule API')
* | build: fix searching dlopen in configureBeniamino Galvani2019-03-311-2/+3
| | | | | | | | | | | | | | | | | | The 4th argument of AC_SEARCH_LIBS is a list of additional libraries, not the name of the variable to hold the result which is always ac_cv_search_$function. Also, we should ignore the result when it is "none required". Fixes: 1f2eeb85d80d ('build: rename $(LIBDL) to $(DL_LIBS) and modify detection')
* | libnm-core: make compiler happyfg/tmpFrancesco Giudici2019-03-291-1/+1
| | | | | | | | | | ../libnm-core/nm-utils.c:6784:30: error: unused variable 'var_unref' [-Werror,-Wunused-variable] gs_unref_variant GVariant *var_unref = vlan_var;
* | libnm-core: drop unused variableFrancesco Giudici2019-03-281-1/+0
| |
* | ovs: don't traverse interface through disconnected when the ovsdb entry is ↵Lubomir Rintel2019-03-281-8/+1
| | | | | | | | | | | | | | | | | | | | removed Go straight to unmanaged. That's what all the other devices do when their backing resources vanish. If the device reached disconnected state, an autoconnect check would try to connect it back, in vain. https://github.com/NetworkManager/NetworkManager/pull/324
* | ovs-interface: dissociate the link on disconnectionLubomir Rintel2019-03-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Open vSwitch is the special kid on the block -- it likes to be in charge of the link lifetime and so we shouldn't be. This means that we shouldn't be attempting to remove the link: we'd just (gracefully) fail anyways. More importantly, this also means that we shouldn't care if we see the link go away. Once the device reaches DISCONNECTED state, its configuration is cleaned up and we may already be activating another connection. We shouldn't alter the device state when OpenVSwitch decides to drop the old link. https://bugzilla.redhat.com/show_bug.cgi?id=1543557 https://github.com/NetworkManager/NetworkManager/pull/324
* | settings: keep the added connection alive for a bit longerLubomir Rintel2019-03-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a crash on failed AddAndActivate: $ ip link set eth0 down $ nmcli d conn eth0 Error: Failed to add/activate new connection: Connection 'eth0' is not available on device eth0 because device has no carrier <NetworkManager crashes> #3 0x000055555558b6c5 in _nm_g_return_if_fail_warning #4 0x00005555557008c7 in nm_settings_has_connection #5 0x0000555555700e5f in pk_add_cb #6 0x0000555555726e30 in pk_call_cb #7 0x0000555555726e30 in pk_call_cb #8 0x0000555555726e30 in pk_call_cb #9 0x00005555555aaea8 in _call_id_invoke_callback #10 0x00005555555ab2e8 in _call_on_idle https://github.com/NetworkManager/NetworkManager/pull/325
* | libnm,core: merge branch 'th/routing-rule-pt2'Thomas Haller2019-03-2730-813/+4996
|\ \ | | | | | | | | | https://github.com/NetworkManager/NetworkManager/pull/321
| * | core: add handling of IP routing rules to NMDeviceThomas Haller2019-03-276-7/+152
| | |
| * | cli: add support for routing rules to nmcliThomas Haller2019-03-273-632/+997
| | |
| * | ifcfg-rh: add support for routing rules as "ROUTING_RULE_#" keysThomas Haller2019-03-277-11/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initscripts support rule-* and rule6-* files for that. Up until now, we ignored these files for the most part, except if a user configured such files, the profile could not contain any static routes (or specify a route-table setting). This also worked together with the dispatcher script "examples/dispatcher/10-ifcfg-rh-routes.sh". We cannot now start taking over that file format for rules. It might break existing setups, because we can never fully understand all rules as they are understood by iproute2. Also, if a user has a rule/rule6 file and uses NetworkManager successfully today, then clearly there is a script in place to make that work. We must not break that when adding rules support. Hence, store routing rules as numbered "ROUTING_RULE_#" and "ROUTING_RULE6_#" keys. Note that we use different keys for IPv4 and IPv6. The main reason is that the string format is mostly compatible with iproute2. That means, you can take the value and pass it to `ip rule add`. However, `ip rule add` only accepts IPv4 rules. For IPv6 rules, the user needs to call `ip -6 rule add`. If we would use the same key for IPv4 and IPv6, then it would be hard to write a script to do this. Also, nm_ip_routing_rule_from_string() does take the address family as hint in this case. This makes ROUTING_RULE_1="pref 1" ROUTING_RULE6_1="pref 1" automatically determine that address families. Otherwise, such abbreviated forms would be not valid.
| * | libnm: add API to NMSettingIPConfig for routing rulesThomas Haller2019-03-276-3/+578
| | |
| * | libnm: add NMIPRoutingRule APIThomas Haller2019-03-276-1/+2556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add NMIPRoutingRule API with a few basic rule properties. More properties will be added later as we want to support them. Also, add to/from functions for string/GVariant representations. These will be needed to persist/load/exchange rules. The to-string format follows the `ip rule add` syntax, with the aim to be partially compatible. Full compatibility is not possible though, for various reasons (see code comment).
| * | cli: support escaping for splitting for objlist propertiesThomas Haller2019-03-272-6/+39
| | |
| * | libnm/keyfile: add parser_full() hook for reading non GObject based propertiesThomas Haller2019-03-271-21/+38
| | |
| * | libnm/keyfile: add writer_full() hook for persisting non GObject based ↵Thomas Haller2019-03-271-27/+41
| | | | | | | | | | | | properties
| * | libnm/keyfile: return setting-info from _parse_info_find()Thomas Haller2019-03-271-35/+41
| | |
| * | libnm/keyfile: make parsing route/address keys reusableThomas Haller2019-03-271-71/+110
| | | | | | | | | | | | Will be used for routing rules as well.
| * | libnm: add nm_utils_is_valid_iface_name_utf8safe() utilThomas Haller2019-03-272-0/+25
| | |
| * | shared: add nm_utils_str_simpletokens_extract_next()Thomas Haller2019-03-272-0/+55
| | |
| * | shared: add nm_ip_addr_is_null() helperThomas Haller2019-03-271-0/+10
| | |
| * | platform: set fib_rule_hdr.table to RT_TABLE_UNSPEC for tables larger 255Thomas Haller2019-03-271-1/+1
| | | | | | | | | | | | | | | No difference in practice, because kernel will ignore the table field is FRA_TABLE attribute is present.
| * | platform: fix default routing rules added by kernel in NMPRulesManagerThomas Haller2019-03-271-0/+5
| | | | | | | | | | | | Fixes: b8398b9e7948 ('platform: add NMPRulesManager for syncing routing rules')
| * | cli: fix accepting %NULL value for '+' modifierThomas Haller2019-03-271-1/+6
|/ / | | | | | | | | | | | | | | | | I find it questionable, how nmcli likes to coerce the empty input to NULL to indicate resetting the value. If nmcli would like to set a default, it should use a different way of signalling that. Anyway, the assertion was too strict. $ nmcli connection modify "$PROFILE" +ipv4.addresses ''
* | lldp: merge branch 'bg/lldp-enh-rh1652211'Beniamino Galvani2019-03-279-886/+2227
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | This adds new TLV types to the D-Bus and libnm API. nmcli will be updated later to support those TLVs. https://bugzilla.redhat.com/show_bug.cgi?id=1652211 https://github.com/NetworkManager/NetworkManager/pull/287
| * | libnm/lldp: cleanup asserting for valid NMLldpNeighbor agumentbg/lldp-enh-rh1652211Thomas Haller2019-03-271-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | At a few places we checked whether neighbor->attrs was non-NULL. That is not necessary, unless we'd like to catch some dangling/invalid pointers. The attrs hash is always set otherwise. Instead of just dropping the check, add a NM_IS_LLDP_NEIGHBOR() macro (inline function).
| * | core/lldp: avoid default switch case in lldp_neighbor_to_variant()Thomas Haller2019-03-271-1/+1
| | | | | | | | | | | | | | | Explicitly check for LLDP_ATTR_TYPE_NONE. That's the only one we expect, and the compiler can warn about missing switch cases for enums.
| * | core/lldp: fix checking for NM_MORE_ASSERTSThomas Haller2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's called NM_MORE_ASSERTS not WITH_MORE_ASSERTS. Also, NM_MORE_ASSERTS is always enabled. It's wrong to check whether it is defined. Fixes: e1e428b21e56cad3c50419e3fe2806dbbb21c976
| * | libnm/lldp: fix leak and bug in nm_lldp_neighbor_dup()Thomas Haller2019-03-271-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For one, just reassigning copy->attrs leaks the previous hash table. Fix that. Also, NMLldpNeighbor instances are not immutable. I think that is an uglyness, and it would be preferable that they can be sealed. A sealed object could safely share/ref the internal hash-table. However, as it is, we cannot just have two NMLldpNeighbor instances share the same hash-table. Do a full copy.
| * | lldp: support IEEE 802.3 TLVsBeniamino Galvani2019-03-274-14/+124
| | | | | | | | | | | | | | | | | | | | | | | | Add support for IEEE 802.3 organizationally specific TLVs: - MAC/PHY configuration/status (IEEE 802.1AB-2009 clause F.2) - power via medium dependent interface (clause F.3) - maximum frame size (clause F.4)
| * | lldp: support multiple PPVIDsBeniamino Galvani2019-03-274-15/+54
| | | | | | | | | | | | | | | As done for VLANs, add a new 'ppvids' attribute that reports all 'port and protocol VLAN ID' TLVs for the neighbor.
| * | lldp: support multiple vlansBeniamino Galvani2019-03-274-29/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we exported the contents of VLAN Name TLV in the 'vid' (uint32) and 'vlan-name' (string) attributes. This is not entirely correct as the TLV can appear multiple times. We need a way to export all the VLAN IDs and names for the neighbor. Add a new 'vlans' attribute which obsoletes the other two and is an array of dictionaries, where each dictionary contains the 'vid' and 'name' keys.
| * | lldp: add support for management address TLVBeniamino Galvani2019-03-274-7/+177
| | | | | | | | | | | | | | | | | | Support the management address TLV (IEEE 802.1AB-2009 clause 8.5.9). The TLV can appear multiple times and so it is exported on D-Bus as an array of dictionaries.
| * | libnm: add nm_lldp_neighbor_get_attr_value()Beniamino Galvani2019-03-273-0/+24
| | | | | | | | | | | | | | | The function provides access to the GVariant representing a LLDP attribute.
| * | libnm: make attribute name const in LLDP API functionsBeniamino Galvani2019-03-272-6/+6
| | | | | | | | | | | | | | | | | | Add the const qualifier to the attribute name in LLDP API functions so that const strings and string literals are accepted. This change is backwards compatible for existing users of the API.
| * | lldp: rename enum valueBeniamino Galvani2019-03-271-7/+7
| | |
| * | cli: add lldp output testsBeniamino Galvani2019-03-273-784/+1759
| | | | | | | | | | | | Check the result of 'nmcli device lldp' command.
| * | lldp: drop _access* macrosBeniamino Galvani2019-03-271-19/+5
|/ / | | | | | | Use unaligned access functions instead where needed.
* | dns: fix memory leak of errorBeniamino Galvani2019-03-261-2/+1
| | | | | | | | | | | | The error was leaked when cancelled. Fixes: 818023c257ca ('dns/resolved: add systemd-resolved backend')
* | merge: branch 'bg/bridge-vlan-filtering'Beniamino Galvani2019-03-2626-123/+2210
|\ \ | | | | | | | | | | | | https://github.com/NetworkManager/NetworkManager/pull/322 https://bugzilla.redhat.com/show_bug.cgi?id=1652910