summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: add list of changed properties to reapply audit logbg/bond-reapply-rh1348198Beniamino Galvani2017-03-041-2/+9
|
* audit: add @args to device logging functionsBeniamino Galvani2017-03-043-16/+22
|
* core: split nm_utils_format_con_diff_for_audit()Beniamino Galvani2017-03-043-45/+41
| | | | | The function will be called to display in audit logs the changes done to connections.
* device: bond: implement connection reapplyBeniamino Galvani2017-03-041-0/+116
| | | | | Only a couple of bond options (active_slave, primary) are supported at for now.
* device: introduce class methods for connection reapplyBeniamino Galvani2017-03-042-44/+95
| | | | | | Add two new methods can_reapply_change() and reapply_connection() to the device class. In this way device subclasses can declare that they support the changes in a given setting and take care of reapplying it.
* device: internally export nm_device_hash_check_invalid_keys()Beniamino Galvani2017-03-042-16/+21
|
* bond: set the active slave only after enslavementBeniamino Galvani2017-03-041-0/+20
| | | | | | The kernel doesn't accept an interface to be set as active_slave until the interface is enslaved to the bond. Delay the initialization of the property.
* dhcp/dhclient: parse "interface" statementsBeniamino Galvani2017-03-032-0/+140
| | | | | | | | | | | | Until now any "interface" statement was ignored and any enclosed statement for which we have a special handling was considered, even if belonging to a different interface. This can cause wrong options to be set in the generated dhclient configuration. Change the code to parse "interface" statements and skip the content if the interface doesn't match. https://bugzilla.gnome.org/show_bug.cgi?id=778430
* dnsmasq: use ipv4.dns and ipv4.dns-search with ipv4.method=sharedThomas Haller2017-03-031-0/+20
| | | | | Configure the dnsmasq DHCP server for shared mode to announce the configured name resolution settings.
* dnsmasq: reuse string buffer in creating command line arguments in ↵Thomas Haller2017-03-031-10/+11
| | | | create_dm_cmd_line()
* tests: accept trailing arguments to "tools/run-nm-test.sh"Thomas Haller2017-03-021-3/+11
| | | | | | | | | | | | | | | | | | | | | | | Previously, the test runner would only accept leading options, an optional "--" separator, followed by "$TEST" and optional arguments for the test. Like ./tools/run-nm-test.sh -m src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh That is annoying, because to toggle an option you have to seek the curser in the before the test name. Now, accept a "--test" option, so that the above can be done with trialing arguments: ./tools/run-nm-test.sh -t src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -m However, the arguments for the tests still must come last: ./tools/run-nm-test.sh -m [--] src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -p /settings/plugins/ifcfg-rh/bridge/write-master ./tools/run-nm-test.sh -t src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -m [--] -p /settings/plugins/ifcfg-rh/bridge/write-master
* tests: fix "tools/run-nm-test.sh" to build test firstThomas Haller2017-03-021-8/+8
| | | | | | | | ./tools/run-nm-test.sh -m src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh makes the test before running it. However, that failed if the test didn't exist already. Reorder the code so that we always try to make the test before trying to run it.
* docs: update yearsLubomir Rintel2017-03-024-2/+18
|
* contrib/rpm: drop EOL versions of FedoraLubomir Rintel2017-03-021-16/+5
| | | | | These are history and noone should be using them; special casing them is essentially line noise.
* contrib/rpm: install D-Bus service files to /usr if we canLubomir Rintel2017-03-021-4/+12
| | | | | This is in fact the correct location, but dbus in RHEL 7 is still too old to be able to use that.
* ifcfg-rh,keyfile: merge branch 'th/ifcfg-reread-rh1427482'Thomas Haller2017-03-0223-180/+625
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1427482
| * ifcfg/trivial: rename svFileSetName() and svFileSetModified() to mark for ↵Thomas Haller2017-03-023-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | testing The filename of the shvarFile instance should be immutable and stay unchanged for the entire lifetime of the instance. Similarly, the modified flag should not be explicitly set. However, for testing it is still useful to give the unit test a direct access to those functions. Rename the setters to make it clear that this is test-only.
| * libnm-core: normalize invalid bridge|team slave-port settingsth/ifcfg-reread-rh1427482Thomas Haller2017-03-024-17/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a bridge-port/team-port setting for a connection that has a different slave-type makes no sense. Such a configuration shall be considered invalid, and be fixed by normalization. Note that there is already a normalization the other way around, when you omit the "slave-type" but a "master" and one(!) port-type setting is present, the slave-type is automatically determined based on the port-type. The use of this is of course to modify an existing slave connection to make it a non-slave. Then the invalid port settings should be automatically removed. Previously, ifcfg-rh writer would write the "BRIDGING_OPTS" setting without a "BRIDGE". The reader would then (correctly) ignore the bridge-port. Avoid that altogehter, by requiring the connection to strictly verify.
| * ifcfg-rh: require connections to be fully normalized for writingThomas Haller2017-03-022-3/+6
| |
| * keyfile: updated connection when writing keyfileThomas Haller2017-03-022-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | Writing a connection to keyfile and read it back should result in the identical setting. That is, a full round-trip would not alter any information. That is however particularly not true for certificate properties, where the keyfile writes blobs to file and coerces paths. Thus, whenver writing a keyfile we must read back what we just wrote and use that instead.
| * keyfile: extend internal API to re-read keyfile connection after writingThomas Haller2017-03-027-18/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API to re-read the keyfile after writing it. Usually, we would expect that whenever we serialize something to disk, it can be read back exactly the same. That is however not true for certificates, where we mangle path and blobs while writing to file. Anyway, extend the write-API to re-read what we just wrote. The tests got extended to assert that whatever we write can be read back the same. Later, we want to reinject the reread connection into the settings plugin again.
| * libnm-core: expose internal _nm_connection_verify() functionThomas Haller2017-03-023-21/+19
| |
| * all: use stack-allocated uuid at various placesThomas Haller2017-03-024-16/+15
| | | | | | | | No need to create a UUID on the heap in this case.
| * libnm-core: add ethernet setting for vlan connectionThomas Haller2017-03-023-5/+28
| | | | | | | | | | | | | | | | | | | | | | A "vlan" setting can optionally have an ethernet setting. However, ifcfg-rh reader always adds such a setting, because well... Anyway, the result is that writing a VLAN setting without ethernet section will yield a different result on re-read. Let's have normalization add the ethernet setting, so that two we consistently have it present.
| * ifcfg-rh: fix reading team slave types of vlan typeThomas Haller2017-03-022-4/+17
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1427482
| * ifcfg-rh/tests: add test for writing team slaveThomas Haller2017-03-021-0/+59
| | | | | | | | | | | | This shows the current bug, needs to be fixed. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1427482
| * ifcfg-rh: add internal API to re-read connection after writeThomas Haller2017-03-025-31/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our reader/writer has flaws. We easily write out something that is re-read differently. That is a problem and should be fixed. Add API to re-read the connection after writing. Extend the tests to check that the re-read value is identical to what we wrote. In some cases, this does not hold. That is usually a bug which needs fixing. Note that for certificate blobs and paths we may intentionally mutate the connection during writing, so there are valid cases where a connection is re-read differently.
| * ifcfg-rh: change "goto error" pattern to return early and nm_auto*Thomas Haller2017-03-021-69/+43
|/
* libnm/manager: make sure the devices and acs won't notify manager after the ↵Lubomir Rintel2017-02-281-4/+4
| | | | | | manager is gone https://bugzilla.redhat.com/show_bug.cgi?id=1425838
* merge: 'lr/nmtui-slaves-after-master-rh1369008'Lubomir Rintel2017-02-2710-32/+117
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1369008
| * ifcfg: avoid marking newly created connections as Unsavedlr/nmtui-slaves-after-master-rh1369008Lubomir Rintel2017-02-271-3/+5
| |
| * tui: recommit bond, bridge and team slaves on master saveLubomir Rintel2017-02-273-0/+38
| | | | | | | | | | The ifcfg-rh plugin may want to update its MASTER= key accordingly for better compatibility with the legacy network service.
| * tui/editor: notify the pages after the connection is savedLubomir Rintel2017-02-273-0/+32
| | | | | | | | | | This will make it possible for the pages to commit slave connections when the master connection is saved.
| * tui/edit-connection-list: add routine to recommit connections in a listLubomir Rintel2017-02-272-0/+29
| | | | | | | | | | This is useful when master connections are saved potentially influencing how slave connections are serialized.
| * settings-connection: fix Save()Lubomir Rintel2017-02-271-5/+12
| | | | | | | | | | | | Avoid using new_settings when they are none. Also, don't shortcut when the connection hasn't been changed -- let the settings plugin decide if it needs to rewrite the connection.
| * ifcfg-rh: don't shortcut writing if the connection stays the sameLubomir Rintel2017-02-271-24/+1
|/ | | | | | Some keys, such as MASTER may still be different as they may depend on other connections. svWriteFile() checks if the resulting file is different already anyway.
* libnm-core/trivial: fix a typo in doc commentLubomir Rintel2017-02-251-1/+1
|
* dns/resolved: consider configuration from unmanaged devicesBeniamino Galvani2017-02-241-3/+0
| | | | | | | | The DNS configuration for VPN connections is associated to the VPN device (tun, ppp, etc.) and that device can be unmanaged by NM: don't ignore such configuration. We do the same for other DNS plugins. https://bugzilla.gnome.org/show_bug.cgi?id=779087
* session: merge branch 'th/elogind-bgo779167'Thomas Haller2017-02-243-15/+61
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=779167
| * session: make systemd-logind and elogind conflicting build optionsth/elogind-bgo779167Thomas Haller2017-02-243-18/+20
| |
| * session: add elogind supportSven Eden2017-02-243-10/+54
|/ | | | | https://bugzilla.gnome.org/show_bug.cgi?id=779167 https://bugs.gentoo.org/show_bug.cgi?id=607352
* manager: fix clearing error variable in autoconnect_slaves()Thomas Haller2017-02-241-1/+1
|
* device: mark uses of device's state-reason with nm_device_state_reason_check()Thomas Haller2017-02-2310-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | The state-change of a device has a reason argument, which is mostly for information only. There are many places in code that are the source of a state-reason. Mostly these are calls to: - nm_device_state_changed() - nm_device_queue_state() - nm_device_queue_recheck_available() - nm_device_set_unmanaged_by_*() - nm_device_master_release_one_slave() - nm_device_ip_method_failed() - nm_modem_emit_prepare_result() - nm_modem_emit_ppp_failed() - nm_manager_deactivate_connection() - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_*); However, there are a few places in code that look at the reason to decide how to proceed. I think this is a bad pattern, because cause and effect are decoupled and it gets hard to understand where a certain reason is set and what consequences that has. Add a nop-function nm_device_state_reason_check() to mark all uses of the device state reason that derive decisions from it. That is, highlight the "effect" part.
* settings: refactor autoconnect-blocked-reason to use own enumThomas Haller2017-02-234-21/+37
| | | | | | | Don't reuse NMDeviceStateReason for the autoconnect-blocked-reason. There are only two cases we care: blocked-due-to-no-secrets, blocked-otherwise. Encode these values in a new enum type.
* all: use "static inline" keywords instead of "inline static"Thomas Haller2017-02-236-76/+77
| | | | | Use a consistent order of "static inline". This seems the prefered order in general, and we also use it more often already.
* modem: remove unused reason argument from nm_modem_device_state_changed()Thomas Haller2017-02-234-8/+5
| | | | | The reason has pecular meanings during a device state change. Let's remove the unused reason argument to reduce the noise.
* modem: merge branch 'th/modem-signal-cleanup'Thomas Haller2017-02-238-42/+78
|\
| * modem: cleanup integer types for ppp-stats signalth/modem-signal-cleanupThomas Haller2017-02-233-12/+19
| | | | | | | | | | In practice, guint32 is identical to guint. However, that is not guaranteed, and we should keep the types separate.
| * modem: add nm_modem_emit_ppp_failed() functionThomas Haller2017-02-235-5/+21
| | | | | | | | ... instead of emitting the signal by name.
| * modem: add nm_modem_emit_prepare_result() functionThomas Haller2017-02-236-20/+31
| | | | | | | | | | | | | | ... instead of emitting the signal by name. For one, we get the casting of the NMDeviceStateReason enum right. Also, emitting by the guint signal-id is faster then emitting by name.