Commit Graph

17169 Commits

Author SHA1 Message Date
Beniamino Galvani
c39e03edbf device: manage firewall zone for assumed persistent connections
After the fix in [1], if the connection is assumed we don't update its
firewall zone. The goal of that change was to prevent NM from
interfering with the configuration done externally on devices not
created by NM.

However if there is an assumed persistent connection active on the
device NM touches the configuration in other ways, for example it
configures DHCP and manages the default route. So it seems correct to
also update the firewall zone.

OTOH, if the connection is assumed-generated there is no persistent
connection specifying a firewall zone and updating it makes no sense.

Bug [1] was about not interfering with devices unknown to NM (for
which there is no persistent connection) and so this change should not
conflict with the previous fix.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1098281

https://bugzilla.redhat.com/show_bug.cgi?id=1366288
2016-08-31 14:44:02 +02:00
Thomas Haller
d2550cef44 core: merge branch 'th/dbus-property-changed-source-iface-bgo770629'
https://bugzilla.gnome.org/show_bug.cgi?id=770629
2016-08-31 14:22:34 +02:00
Thomas Haller
46f285e3d3 exported-object: cleanup logging about properties-changed 2016-08-31 14:22:28 +02:00
Thomas Haller
82e94390de exported-object: fix source interface for PropertiesChanged D-Bus signal
nm_exported_object_notify() hooks GObject's property-change signal
and searches for the D-Bus interface to which to send the
PropertiesChanged signal.
Then it would enqueue the value encoded as GVariant in pending_notifications.
However, thereby the association between the property that changed and the
interface was lost. So later in idle_emit_properties_changed() it would
just pick the first interface with a properties-changed-id.

That is wrong. pending_notifications must be associated with the D-Bus
interface that we are going to notify. That is, each InterfaceData must
have its own separate list.

This is broken since introducing NMExportedObject and moving to gdbus.
Only now it was discovered as NMDevice itself has two D-Bus interfaces:
"Device" and "Device.Statistics".

Note that the order of the PropertiesChanged in our D-Bus API is not defined
so that later signals can reach the receiver before earlier signals.
Also, multiple change signals for one property may be combined.
That is not changed by this patch and is not considered a bug, but something
that our D-Bus API wrt. PropertiesChanged does not guarantee.

https://bugzilla.gnome.org/show_bug.cgi?id=770629
2016-08-31 14:22:28 +02:00
Lubomir Rintel
3127fb0d17 device: don't let external changes cause a release of the slave
At this point we don't know if the slave has been using an assumed
connection that just vanished -- the best bet is to let the device be.

If it's meant to be unenslaved, it won't be due to an external event.

https://bugzilla.redhat.com/show_bug.cgi?id=1357738
2016-08-31 12:06:22 +02:00
Thomas Haller
15a0fbdcf5 build/trival: remove misleading code comment in NetworkManager.ver
https://bugzilla.gnome.org/show_bug.cgi?id=770515
2016-08-31 11:46:27 +02:00
Beniamino Galvani
ee6a4039c8 team: merge branch 'bg/team-config-validation'
Restore the validation on team and team port configuration.
2016-08-30 18:21:03 +02:00
Beniamino Galvani
d06279f3db libnm: restore verify() comments in team/team-port settings
Restore the comments removed in commit
a524091966afb884cdb8db48067d5599a685a8eb.
2016-08-30 18:20:28 +02:00
Beniamino Galvani
d6ec009afd team: normalize invalid configuration during load
Now that we validate the JSON syntax of a team/team-port
configuration, any existing connection with invalid JSON configuration
would fail to load and disappear upon upgrade. Instead, modify the
setting plugins to emit a warning but still load the connection with
empty configuration.
2016-08-30 18:20:28 +02:00
Beniamino Galvani
39ad134b0c Revert "libnm-core/team: normalize invalid config to NULL"
It's better to fail the validation of any invalid configuration
instead of silently ignoring it.

This reverts commit 476810c290.
2016-08-30 18:20:28 +02:00
Thomas Haller
34880d62d0 device: forget unmanaged-flag "user-explicit" for unrealized devices
When a software device unrealizes, we want to forget about the "user-explict"
unmanaged state. It means, that after a software device is deleted, the
"user-explict" managed flag will be cleared for that device.

It might be nice to preserve the managed-state after deletion of the device.
However, the unrealized-device only exists as long as we have a connection
for the device. That means, before this patch whether the unmanaged flag
was forgotten depends on whether the user had some connections that keep
the device alive as unrealized. That behavior was complicated, just don't
do that.
2016-08-30 18:06:07 +02:00
Thomas Haller
145d199589 platform: fix return value for error case in do_change_link_request()
There is a "goto retry" in do_change_link_request(), at that point,
seq_result has the value -EOPNOTSUPP, instead of
WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN.

Fixes: 02fb3eff48
2016-08-30 16:22:42 +02:00
Lubomir Rintel
02fb3eff48 platform: fix build
Fixes: 471521ca84187cd32afcd20aebe5a369fe7368dc
2016-08-30 15:05:41 +02:00
Thomas Haller
f3a60e14e7 doc: clearify deprecated "cloned-mac-address" field in documentation 2016-08-30 14:32:10 +02:00
Thomas Haller
e109f87067 device: merge branch 'th/platform-set-address-enfile-bgo770456-v2'
https://bugzilla.gnome.org/show_bug.cgi?id=770456
2016-08-30 11:19:42 +02:00
Thomas Haller
67b6852358 device: add hack to wait after changing MAC address
It seems some drivers return success for nm_platform_link_set_address(),
but at that point the address did not yet actually change *sigh*.
It changes a bit later, possibly after setting the device up.

Add a workaround to retry reading the MAC address when platform indicates
success but the address still differs at first.

https://bugzilla.gnome.org/show_bug.cgi?id=770456
2016-08-29 18:39:30 +02:00
Thomas Haller
d51f2c2a4e device: fix spelling in logging 2016-08-29 17:14:11 +02:00
Thomas Haller
091620e765 platform: merge branch 'th/platform-set-address-enfile-bgo770456'
https://bugzilla.gnome.org/show_bug.cgi?id=770456
2016-08-29 11:41:05 +02:00
Thomas Haller
2bef71611b platform: workaround kernel wrongly returning ENFILE when changing MAC address
https://bugzilla.gnome.org/show_bug.cgi?id=770456
2016-08-29 11:36:01 +02:00
Thomas Haller
3dc0944677 platform: split processing result from do_change_link() 2016-08-29 11:30:50 +02:00
Thomas Haller
895c61a742 platform/tests: avoid test failure setting bridge forward_delay
Seems odd numbers may be coerced to the next-smaller even number.
Avoid that by using an even number for the test, as the number
has no particular meaning.

https://bugzilla.gnome.org/show_bug.cgi?id=765835
2016-08-28 17:59:42 +02:00
Michael Biebl
2f8ab8cd9f build: export _IO_stdin_used symbol in NetworkManager.ver
This symbol is required to decide which version of certain IO functions
to use on various architectures. So we can't strip away the symbol from
the NetworkManager binary as this will lead to segfaults on those
architectures.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550
https://bugzilla.gnome.org/show_bug.cgi?id=770515
2016-08-28 16:49:33 +02:00
Beniamino Galvani
c90ec2d8c8 settings: remove wrong comment about selinux labeling
The code does the right thing as g_file_set_contents() will create
the temporary file using the label set by setfscreatecon().
2016-08-26 20:54:47 +02:00
Beniamino Galvani
f87ca31341 man: NetworkManager.conf: fix link syntax
Fixes: c7cee12189
2016-08-26 20:53:28 +02:00
Yuri Chornoivan
d1f1c2f18c po: update Ukrainian (uk) translation (bgo#770447)
https://bugzilla.gnome.org/show_bug.cgi?id=770447
2016-08-26 19:04:50 +02:00
Yuri Chornoivan
297ade2745 all: fix typos in documentation and translated strings
https://bugzilla.gnome.org/show_bug.cgi?id=770445
2016-08-26 19:00:12 +02:00
Thomas Haller
6fb2a24f3a man: fix reference in NetworkManager.conf
Without this, it reads:
  See the section called “Sections” for details.
but there are multiple sections called “Sections” and it should
explicitly refer to the one from the other top-level section.

With this change, it reads:
  See “Sections” under the section called “CONNECTION SECTION” for details.
2016-08-26 14:58:20 +02:00
Thomas Haller
cbbc8620a1 ifcfg-rh: merge branch 'th/ifcfg-rh-read-team-rh1367180'
https://bugzilla.redhat.com/show_bug.cgi?id=1367180
2016-08-26 12:55:51 +02:00
Thomas Haller
114eb5b963 ifcfg-rh: accept TEAM connections also without DEVICETYPE setting
Allow omitting DEVICETYPE=Team or DEVICETYPE=TeamPort and accept
team connections based on the presence of TEAM_CONFIG/TEAM_MASTER
alone.

Also, check first for a team slave before checking for bond
slave. That is what initscripts do and matters if somebody wrongly
sets MASTER and TEAM_MASTER.

libteam:     20d45a1e02
initscripts: https://git.fedorahosted.org/cgit/initscripts.git/commit/?id=3235be4a3da91bc91c698b318935240dbdf81aac

https://bugzilla.redhat.com/show_bug.cgi?id=1367180
2016-08-26 11:42:51 +02:00
Thomas Haller
50d7ac4af3 ifcfg-rh: make out_unhandled argument non-optional
Depending on the connection we are about to read,
we would assert that the user provided a @out_unhandled
argument.

That means, the user must always provide a valid @out_unhandled
pointer, because he cannot know beforehand how the reading
of the ifcfg file goes.
2016-08-26 11:41:13 +02:00
Thomas Haller
cf7b8866ce ifcfg-rh: clear IP settings for slave connections
Clear some IP related entries from the ifcfg-rh file if
the connection is a slave connection.

Also, drop utils_ignore_ip_config(). It is guaranteed, that
writer only handles connections that verify(). Such connections
have an IPv4/IPv6 setting if (and only if) they are not slave
types.

https://bugzilla.redhat.com/show_bug.cgi?id=1368761
2016-08-26 11:35:05 +02:00
Thomas Haller
c930b7b4fe platform: silence error reading sysctl for non existing device
https://bugzilla.gnome.org/show_bug.cgi?id=770378
2016-08-25 15:38:28 +02:00
Thomas Haller
2a314557c7 release: bump version to 1.5.1-dev after 1.4.0 release
After 1.4.0 is released, merge it back into master so that
1.4.0 is part of the history of master. That means,
  $ git log --first-parent master
will also traverse 1.4.0 and 1.4.0-rc1.

Also, the closest branch parent of master and nm-1-4 branch
becomes 1.4.0 tag.

Also bump the micro version to 1.5.1-dev to indicate that this is
after 1.4.0 is out, otherwise `git describe` uses the 1.4.0 tag.
2016-08-25 14:58:06 +02:00
Lubomir Rintel
93b4119a81 release: bump version to 1.4.0 2016-08-24 18:48:19 +02:00
Beniamino Galvani
2a56c07092 dhcp/systemd: honor timeout for DHCPv6
https://bugzilla.gnome.org/show_bug.cgi?id=770329
(cherry picked from commit bdaa3acfc3)
2016-08-24 18:01:18 +02:00
Beniamino Galvani
bdaa3acfc3 dhcp/systemd: honor timeout for DHCPv6
https://bugzilla.gnome.org/show_bug.cgi?id=770329
2016-08-24 18:00:06 +02:00
Lubomir Rintel
afab2b8112 cli: only connect handlers for property changes in interactive edit
Fixes: c5324ed285
(cherry picked from commit 79c81bbb8c)
2016-08-24 17:27:55 +02:00
Lubomir Rintel
2f45665559 cli: default to method=manual when adding an address
This restores accidentally changed behavior for
"nmcli c add ... ip[46] <address>"

Fixes: c5324ed285
(cherry picked from commit 195ad4ec97)
2016-08-24 17:27:55 +02:00
Lubomir Rintel
79c81bbb8c cli: only connect handlers for property changes in interactive edit
Fixes: c5324ed285
2016-08-24 17:22:54 +02:00
Lubomir Rintel
195ad4ec97 cli: default to method=manual when adding an address
This restores accidentally changed behavior for
"nmcli c add ... ip[46] <address>"

Fixes: c5324ed285
2016-08-24 17:22:54 +02:00
Thomas Haller
890c37ebd0 team: merge branch 'th/team-invalid-config-rh1366300'
https://bugzilla.redhat.com/show_bug.cgi?id=1366300

(cherry picked from commit eb982b9d94)
2016-08-24 11:00:02 +02:00
Thomas Haller
5b9f7169ed libnm-core/team: normalize invalid config to NULL
A user may very well have connections on disk with bogus json.
Such connections may have failed to activate before, but rejecting
them now as invalid means that we stop loading them from disk. That is,
they disappear after upgrade.

Instead of doing that, also accept invalid json (beside "") and
normalize/coerce it to NULL.

https://bugzilla.redhat.com/show_bug.cgi?id=1366300
(cherry picked from commit 476810c290)
2016-08-24 10:59:39 +02:00
Lubomir Rintel
5f1662066d libnm-core/team: treat "" team config as no config
https://bugzilla.redhat.com/show_bug.cgi?id=1366300
(cherry picked from commit 0fc8b856c3)
2016-08-24 10:59:39 +02:00
Thomas Haller
9382fb0213 device/team: fix assuming non-NULL team-config in NMDeviceTeam::act_stage1_prepare()
(cherry picked from commit 4f6fd1bf0e)
2016-08-24 10:59:39 +02:00
Thomas Haller
eb982b9d94 team: merge branch 'th/team-invalid-config-rh1366300'
https://bugzilla.redhat.com/show_bug.cgi?id=1366300
2016-08-24 10:58:41 +02:00
Thomas Haller
476810c290 libnm-core/team: normalize invalid config to NULL
A user may very well have connections on disk with bogus json.
Such connections may have failed to activate before, but rejecting
them now as invalid means that we stop loading them from disk. That is,
they disappear after upgrade.

Instead of doing that, also accept invalid json (beside "") and
normalize/coerce it to NULL.

https://bugzilla.redhat.com/show_bug.cgi?id=1366300
2016-08-24 10:58:02 +02:00
Lubomir Rintel
0fc8b856c3 libnm-core/team: treat "" team config as no config
https://bugzilla.redhat.com/show_bug.cgi?id=1366300
2016-08-24 10:57:54 +02:00
Thomas Haller
4f6fd1bf0e device/team: fix assuming non-NULL team-config in NMDeviceTeam::act_stage1_prepare() 2016-08-24 10:30:34 +02:00
Thomas Haller
07e8ddbfd8 NEWS: update
(cherry picked from commit 0a04b55491)
2016-08-23 22:52:28 +02:00
Thomas Haller
0a04b55491 NEWS: update 2016-08-23 22:46:35 +02:00