| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Plugins may have problems with preserving some properties on write/read cycle,
may add ipv{4,6} settings when they are not present in the connection, etc.
That makes local and remote connection differ.
So we copy remote connection into the local to get rid of such problems.
Note:
68f12b4e9c134d41e42cc8a1986cad6bb3c07b7a and
f03635e5ac829d4fc896573f2f3c6969b9d5a2e2
commits ensure that all connection (except slaves) have IPv{4,6} settings.
https://bugzilla.redhat.com/show_bug.cgi?id=997958
|
| |
|
|
|
|
| |
Reported-by: Julien Nabet <serval2412@yahoo.fr>
|
|
|
|
|
|
|
| |
The internal VLAN flags were translated into the kernel VLAN flags but
finally the internal ones were passed to the kernel instead.
Reported-by: Julien Nabet <serval2412@yahoo.fr>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=710505
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before, you had to select at compile time to run BlueZ4 or BlueZ5.
Now, both versions are enabled together and NM detects the actual
version at runtime.
The configure option --enable-bluez4 got removed.
The advantage is now, that you can switch between the two versions of
BlueZ without rebuilding NetworkManager. Note however, that you still
must restart NetworkManager, because once a version is detected, it will
not switch again as long as the process runs.
Another advantage is that before not all code was build, and you had
to build two configurations for testing.
https://bugzilla.gnome.org/show_bug.cgi?id=709412
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix several issues with emitting the BDADDR_ADDED/BDADDR_REMOVED
signals:
- when removing a device, the handlers were never disconnected from
the device's notify::usable and initialized signals.
- ensure that the signals BDADDR_ADDED/BDADDR_REMOVED only get emitted
in a consistent way (toggeling). Before, there was a bug, that the
signal BDADDR_REMOVED was emitted for devices that were never added
and never usable.
Co-Authored-By: Dan Williams <dcbw@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactor nm-bluez-device.c to use GDBus both to connect to
BlueZ 4 and BlueZ 4.
Also remove the unused property RSSI.
Also prefix every logline with the dbus path of the device.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
NMBluezManager is now a proxy and only delegates to either
NMBluez4Manager or NMBluez5Manager. It detects the running BlueZ
version at runtime, and once it decides for one version, it cannot be
changed anymore as long NetworkManager is running.
This means, when switching from BlueZ4 to BlueZ5 or vice versa you have
to restart NetworkManager. This should be acceptable, because it is
not a common use case (most systems won't have both versions installed
anyway) and it greatly simplifies implementation.
Also note that NMBluez4Manager and NMBluez5Manager do not implement a
common interface. NMBluezManager delegates to the correct manager.
Having them share an common interface or base class would not simplify
the code, because NMBluezManager not only delegates, but it also acts as
a proxy until it is decided which BlueZ version is running. So, this
proxy-like behaviour would still be needed. The alternative would be to
merge the functionality of all three NMBluez*Manager classes into one.
This also removes the --enable-bluez4 configure switch, because both
versions are now always enabled.
https://bugzilla.gnome.org/show_bug.cgi?id=709412
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Do no longer separate nm-bluez-device at compile time with the
WITH_BLUEZ4 preprocessor flag.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|/
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
| |
nm_settings_connection_commit_changes/_delete optional
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If the WiMAX plugin isn't installed, or the WiMAX device isn't
recognized, NetworkManager shouldn't treat the interface as
regular ethernet since the device requires specific setup to
be ready for IP configuration, which of course NetworkManager
can't do because the WiMAX plugin isn't loaded. Ignore them
instead.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
add_connection() hook
Plugin owns the object and callers must reference it if they wish to use it outside
of the function they called "add" from. Likewise, callers of the ConnectionProvider's
add_connection method must also reference the returned object if they wish to
continue using it.
|
|
|
|
|
|
| |
Print a warning instead.
https://bugzilla.redhat.com/show_bug.cgi?id=1015809
|
|
|
|
|
|
|
|
| |
Actually, this case should no longer happen, but just to be sure:
when a udev remove event without ifindex comes, get the ifindex from
the cache and announce the device removal.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before NMPlatform landed, the old NMManager code looked at either
DEVTYPE=wlan or asked the internal wifi utilities whether the
device was WiFi or not. This got lost when moving to NMPlatform.
It turns out that only mac80211-based drivers set the DEVTYPE=wlan
flag in sysfs, while older WEXT, out-of-tree, and staging drivers
often do not (though they should).
To avoid breaking recognition of these crappy drivers that used
to work, re-add the wifi utils checks.
|
|
|
|
|
| |
When a connection is updated (either by its plugin or via D-Bus), we
need to normalize and verify it before accepting the changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to get IFINDEX using g_udev_device_get_property() instead of
g_udev_device_get_sysfs_attr().
On removal the IFINDEX in sysfs may not be available - this didn't caused
problems because such an event was ignored. But sometimes the sysfs IFINDEX
in 'remove' action was present, but *wrong*. It contained IFINDEX of a newly
created device of the same name, and thus it triggered removal of the new
device instead of the old one.
Logs (grepped):
...
NetworkManager[30628]: <info> Auto-activating connection 'b1'.
NetworkManager[30628]: <debug> [1381930187.149545] [platform/nm-platform.c:1777] log_link(): signal: link added: bb (328)
NetworkManager[30628]: <debug> [1381930187.937222] [platform/nm-linux-platform.c:2568] handle_udev_event(): UDEV event: action 'add' subsys 'net' device 'bb' (328)
NetworkManager[30628]: <debug> [1381930187.937662] [platform/nm-platform.c:1777] log_link(): signal: link added: bb (328)
NetworkManager[30628]: <info> (bb): deactivating device (reason 'user-requested') [39]
NetworkManager[30628]: <debug> [1381930193.266097] [platform/nm-platform.c:397] nm_platform_link_delete(): link: deleting 'bb' (328)
NetworkManager[30628]: <debug> [1381930193.279324] [platform/nm-platform.c:1777] log_link(): signal: link removed: bb (328)
NetworkManager[30628]: <debug> [1381930193.348167] [platform/nm-linux-platform.c:2568] handle_udev_event(): UDEV event: action 'remove' subsys 'net' device 'bb' (unknown)
NetworkManager[30628]: <info> Auto-activating connection 'b1'.
NetworkManager[30628]: <debug> [1381930193.561106] [platform/nm-platform.c:1777] log_link(): signal: link added: bb (330)
NetworkManager[30628]: <debug> [1381930194.217300] [platform/nm-linux-platform.c:2568] handle_udev_event(): UDEV event: action 'add' subsys 'net' device 'bb' (330)
NetworkManager[30628]: <debug> [1381930194.217548] [platform/nm-platform.c:1777] log_link(): signal: link added: bb (330)
NetworkManager[30628]: <info> (bb): deactivating device (reason 'user-requested') [39]
NetworkManager[30628]: <debug> [1381930216.329118] [platform/nm-platform.c:397] nm_platform_link_delete(): link: deleting 'bb' (330)
NetworkManager[30628]: <debug> [1381930216.344442] [platform/nm-platform.c:1777] log_link(): signal: link removed: bb (330)
NetworkManager[30628]: <info> Auto-activating connection 'b1'.
NetworkManager[30628]: <debug> [1381930216.598636] [platform/nm-platform.c:1777] log_link(): signal: link added: bb (332)
This line is bad:
NetworkManager[30628]: <debug> [1381930217.79182] [platform/nm-linux-platform.c:2568] handle_udev_event(): UDEV event: action 'remove' subsys 'net' device 'bb' (332)
NetworkManager[30628]: <debug> [1381930217.81009] [platform/nm-platform.c:1777] log_link(): signal: link removed: bb (332)
NetworkManager[30628]: <info> (bb): deactivating device (reason 'removed') [36]
NetworkManager[30628]: <debug> [1381930217.95192] [platform/nm-linux-platform.c:2568] handle_udev_event(): UDEV event: action 'add' subsys 'net' device 'bb' (332)
NetworkManager[30628]: <debug> [1381930217.95492] [platform/nm-platform.c:1777] log_link(): signal: link added: bb (332)
NetworkManager[30628]: <info> Auto-activating connection 'b1'.
...
|
| |
|
| |
|
|
|
|
|
|
|
| |
When connecting to a hidden SSID, the Access Point object that NetworkManager
creates will have no frequency, because the frequency is unknown until the
connection succeeds. The warning has no use; if the AP doesn't have a
frequency then it even match a connection with a specified frequency.
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although it's convenient in some places to have IP configs on all
connections, it makes more sense in other places to not have IP
configs on slaves. (eg, it's confusing for nmcli, etc, to report a
full NMSettingIP4Config on a slave device). So revert parts of the
earlier patch. However, it's still safe to assume that s_ip4 != NULL
if method != DISABLED, so some of the earlier simplifications can
stay.
Also, add nm_utils_get_ip_config_method(), which returns the correct
IP config method for a connection, whether the connection has IP4 and
IP6 settings objects or not, and use that to keep some more of the
simplifications from the earlier patch.
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
We have to check if 'client' is valid when calling _nm_object_ensure_inited().
Creation of NMClient object can fail, because its parent NMObject's
constructor() returns NULL for D-Bus errors.
https://bugzilla.redhat.com/show_bug.cgi?id=1010288
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
| |
ifcfg-rh had the rule that if an ifcfg file had no BOOTPROTO and no
IPv4 addresses, then it should be treated as method=auto for
compatibility. But in fact, current ifup treats it as method=disabled,
so we should too.
https://bugzilla.gnome.org/show_bug.cgi?id=708875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that all connections returned from NMSettings or created via
AddAndActivateConnection have an NMSettingIP4Config and an
NMSettingIP6Config, with non-NULL methods, and get rid of
now-unnecessary checks for those.
Also move the slaves-can't-have-IP-config checks into the
platform-independent code as well. This also gets rid of spurious
"ignoring IP4/IP6 configuration" warnings in ifcfg-rh when reading a
slave ifcfg file.
Partly based on a patch from Pavel.
https://bugzilla.gnome.org/show_bug.cgi?id=708875
|
|
|
|
|
| |
There's no way in gobject-introspection to annotate something as
returning an arbitrary C struct type, so don't try.
|
|
|
|
|
|
|
|
|
| |
gtk-doc recognizes that #NMFoos is the plural of #NMFoo now, so you
don't need to put an empty comment between the type name and the "s"
to make it work. (Unfortunately, it's not smart enough to realize that
"NMIP4Addresses" is the plural of "NMIP4Address".)
Also, add some missing "#"s noticed along the way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To present a consistent API to clients, the IP-related properties
are only valid when the device has finished IP configuration. But
they are set before that happens, and their change notifications
were emitted before the IP configuration was considered valid.
Re-emit the change notifications when the device enters the IP_CHECK
state (and thus has IP configuration) and also when the device
deactivates to enusre clients have up-to-date IP-related property
information.
For the changes to has_ip_config(), the priv->ipX_state checks are
not necessary since the device will have valid IP configuration
when it enters the IP_CHECK state. The other checks can be
consolidated into a single statement.
Acked-by: Dan Winship
|
| |
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=709675
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
(rh #1012151)
If the user disabled IPv6 support in the kernel with "ipv6.disable=1" on the
kernel boot line, then any attempts to open IPv6 sockets (which libndp does)
will fail. This failed the entire connection, even if IPv6's "may-fail"
property was TRUE. Instead, just fail IPv6 and allow IPv4 to proceed. If
IPv4 fails or is disabled, then other logic will fail the entire connection.
|
|
|
|
|
|
|
| |
Base on patch from Francesco Prelz <Francesco Prelz mi infn it>:
https://mail.gnome.org/archives/networkmanager-list/2013-January/msg00095.html
https://bugzilla.redhat.com/show_bug.cgi?id=991807
|
|
|
|
|
|
|
|
|
|
| |
connection_from_file() requires the 'error' parameter. Not passing a
valid 'error' parameter causes the function to fail and return NULL,
which mean that commit_changes() would always re-write the connection
instead of ignoring commits where nothing has actually changed.
connection_from_file() no longer requires the unmanaged, keyfile,
or routefile parameters, so remove them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running `make check` on systems without running dbus failed
in test-remote-settings-client.c:383
make[4]: Entering directory `/tmp/NetworkManager/libnm-glib/tests'
/tmp/NetworkManager/libnm-glib/tests/test-remote-settings-client /tmp/NetworkManager/libnm-glib/tests test-remote-settings-service.py
** (/tmp/NetworkManager/libnm-glib/tests/.libs/lt-test-remote-settings-client:26983): WARNING **: Error connecting to D-Bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
make[4]: *** [check-local] Trace/breakpoint trap (core dumped)
Modify the Makefile to start the dbus-daemon, if it is not yet
running.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
| |
|