| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenVPN's 'p2p' topology does send a different peer address than the
local address for tunX, plus the server may also push routes that
use the peer address as the next hop. Unless NetworkManager configures
the tunX interface with the peer address, the kernel refuses to add
the routes with the peer nexthop, because the kernel has no idea
how to talk to the peer, because the peers address is not reachable
over any routes (none have yet been added) and the peer's address is
not assigned to any interface yet.
OR: could we just add a host route through the tunX pointing to
the peer address, and leave the PtP peer address unset?
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some RA implementations (like radvd) dump whatever the user configures
onto the wire, accepting a prefix of "2001:db8:1:0::1/64" without
masking the host bits off.
This causes NetworkManager to send that route down to the kernel, which
*does* mask the host bits off. This causes a mismatch between the
route NetworkManager expects the kernel to create, and what the kernel
actually created, when searching for the kernel object in the platform's
refresh_object() function:
cache = choose_cache (platform, object);
cached_object = nl_cache_search (choose_cache (platform, object), object);
kernel_object = get_kernel_object (priv->nlh, object);
kernel_object is NULL since 'object' (a route which came from the RA
prefix) is not the same as the object the kernel actually did create.
Ensure we match kernel behavior by fixing up prefixes for dumb router
advertisement services.
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1011942
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All NMObjects created in response to property changes were getting
leaked, which in particular included all NMAccessPoint objects, which
meant that after disconnecting and reconnecting a wifi interface some
number of times (depending on how many access points were in the
area), gnome-shell would be watching so many D-Bus AccessPoint objects
(most of which didn't exist any more) that it would hit dbus-daemon's
limit on the number of match rules you can register, which meant that
NMActiveConnections created after that point wouldn't be able to
register for PropertiesChanged notifications, which meant that the
network status icon would get out of sync.
|
|
|
|
|
|
|
|
|
|
|
| |
- completion now works for command shortcuts too
nmcli> g ethe<TAB>
- completion now allows leading spaces
nmcli> desc wifi.ss<TAB>
- fix completion of settings when property is already there
nmcli> set con<TAB>.id
- fix completion of properties in setting.property
nmcli> des con.inter<TAB> bla
|
|
|
|
|
|
|
|
|
|
| |
This fixes an error in the following example:
$ nmcli con add type bridge con-name test-bridge <TAB>
Before, general options such as 'autoconnect' and 'ifname' were
wrongly not suggested.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
| |
g_child_watch_add only emits one signal and gets automatically
removed from the source. No need for double removal, so unset
teamd_process_watch before calling teamd_cleanup.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
| |
Also ensure that teamd_timeout_cb does a state transition of the device.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
| |
g_bus_watch_name immediatly emits a vanished signal, if the name does not exist
at the begining. So the first signal, does not indicate an actual change of
state and must be ignored.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
teamd was being watched using g_bus_watch_name(). But when the NM team device
was destroyed NM tried to remove the watcher with g_source_remove() instead of
g_bus_unwatch_name(). Thus the watcher was not removed and
teamd_dbus_appeared() was called on disposed device.
https://bugzilla.redhat.com/show_bug.cgi?id=1013593#c28
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The session now looks like this:
There are optional arguments for 'bond' connection type.
Do you want to provide them? (yes/no) [yes]
Bonding mode [balance-rr]:
Bonding monitoring mode (miimon or arp) [miimon]: miimon
Bonding miimon [100]:
Bonding downdelay [0]:
Bonding updelay [0]:
...when answered arp...
Bonding arp-interval [0]:
Bonding arp-ip-target [none]:
https://bugzilla.redhat.com/show_bug.cgi?id=1007355
|
| |
|
|
|
|
|
|
| |
53e55aab365a263df5d2e13efe28a5dc5a7b8432 mistakenly moved the address
prefix without moving the memset() to initialize the address. Make
sure the address is initialized before trying to do anything with it.
|
|
|
|
|
|
| |
Use an environment variable LIBNM_GLIB_DEBUG=properties-changed to
indicate that properties-changed debugging messages should be printed.
Also cleans up the debug output formatting.
|
|
|
|
|
| |
miimon or arp_interval == 0 means 'disable'. So we should not remove options of
one mode when the other mode is actually being disabled (set to zero).
|
|
|
|
|
|
|
| |
The variable teamd_on_dbus in nm-device-team was never set to TRUE.
Remove it. Also, before teamd_dbus_vanished did never cleanup anything.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The assertion that priv->teamd_pid is set does not hold.
For example, if no teamd binary can be found, "Stage 1 of 5 (Device
Prepare)" fails with "Activation (nm-team) to start teamd: not found".
This causes the device state to become "failed" and later
"disconnected", which in turn calls teamd_stop without a valid teamd_pid
set.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
| |
NMDeviceTeam dispose() did not chain up to parent dispose(). This prevented
parent dispose() to be called (only finalize()) and thus link_changed_cb()
and device_ip_changed() handlers were not disconnected. Later these handlers
were called on invalid device resulting in a crash.
https://bugzilla.redhat.com/show_bug.cgi?id=1013593
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the session looks like this:
Do you want to add IP addresses? (yes/no) [yes]
Press <Enter> to finish adding addresses.
IPv4 address (IP[/plen] [gateway]) [none]: 10.0.0.22/24 10.0.0.1
Address successfully added: 10.0.0.22/24 10.0.0.1
IPv4 address (IP[/plen] [gateway]) [none]: 10.0.0.22/24 10.0.0.1
Warning: address already present: 10.0.0.22/24 10.0.0.1
IPv4 address (IP[/plen] [gateway]) [none]: 192.168.1.1 abc
Error: invalid gateway 'abc'
IPv4 address (IP[/plen] [gateway]) [none]:
IPv6 address (IP[/plen] [gateway]) [none]: abcd::1234 ::2 blabla
Address successfully added: abcd::1234 ::2
Warning: ignoring garbage at the end: 'blabla'
IPv6 address (IP[/plen] [gateway]) [none]:
|
|
|
|
|
|
|
|
| |
ndp_open() can fail, do not assume it cannot.
When 'ipv6.disable=1' kernel parameter is used, the whole IPv6 stack is
disabled and the attempt to create PF_INET6 socket fails.
https://bugzilla.redhat.com/show_bug.cgi?id=1012151
|