| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Platform not only uses the netlink socket, but also sysfs, udev,
ethtool, mii. To properly support network namespaces, we must
switch the namespace as necessary. In case of udev, it is only
supported on the main namespace.
|
|
|
|
|
| |
When adding namespace support, we must call ethtool
from the proper namespace.
|
|
|
|
|
| |
Sometimes we don't need the _notify() helper which results in a
unused-function warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- All internal source files (except "examples", which are not internal)
should include "config.h" first. As also all internal source
files should include "nm-default.h", let "config.h" be included
by "nm-default.h" and include "nm-default.h" as first in every
source file.
We already wanted to include "nm-default.h" before other headers
because it might contains some fixes (like "nm-glib.h" compatibility)
that is required first.
- After including "nm-default.h", we optinally allow for including the
corresponding header file for the source file at hand. The idea
is to ensure that each header file is self contained.
- Don't include "config.h" or "nm-default.h" in any header file
(except "nm-sd-adapt.h"). Public headers anyway must not include
these headers, and internal headers are never included after
"nm-default.h", as of the first previous point.
- Include all internal headers with quotes instead of angle brackets.
In practice it doesn't matter, because in our public headers we must
include other headers with angle brackets. As we use our public
headers also to compile our interal source files, effectively the
result must be the same. Still do it for consistency.
- Except for <config.h> itself. Include it with angle brackets as suggested by
https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the device is transitioning from unmanaged to disconnected for "assumed"
reason, bring_up is not called. This is not a good thing in numerous
instances, e.g.:
1.) vlans that we've created need that to set IFF_UP and read carrier
otherwise they won't be available for connections.
2.) veths that are being managed need to start the deferred carrier check
so that the behavior matches real Ethernet.
3.) Hardware devices that were plugged in while NetworkManager is running
that need the IFF_UP for a carrier check, possibly enqueueing a deferred one.
Fixes: 5637d72af2d51b6f2b8dbe70553754f1828fdb66.
|
|
|
|
|
| |
Use non-portable gcc extension to allow for zero variadic
arguments so that you can pass a plain string as argument.
|
|
|
|
|
|
|
|
| |
Like we already do for IPv6 addresses, we should expose addresses
in a defined, stable sort order.
Clients usually show the addresses in the same order as obtained
via D-Bus.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sorry, it was not Debian's fault. It is only libnss-devel package on
Ubuntu 12.04/Precise [1].
Revert the workaround and avoid the failure by dropping the version check altogether.
NSS 3.11 is from 2006, it's unlikely a user tries to build current NetworkManager
against such an old version of the library.
[1] https://bugs.launchpad.net/ubuntu/+source/nss/+bug/1547147
This reverts commit d48790cbec7d19b20a10e1627dd8ee1c996425b1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When executing these commands:
ip link add br0 type bridge
ip link set dev br0 up
ip link add dummy1 type dummy
ip link set dev dummy1 up
ip addr add 1.1.1.1/24 dev br0
brctl addif br0 dummy1
sleep 1
ip link del br0
ip link del dummy1
the following assertion was failing:
nm_device_master_release_one_slave: runtime check failed: (NM_FLAGS_HAS (slave_priv->unmanaged_mask, NM_UNMANAGED_IS_SLAVE))
#0 g_logv()
#1 g_log()
#2 g_warn_message()
#3 nm_device_master_release_one_slave()
#4 nm_device_cleanup()
#5 _set_state_full()
#6 nm_device_state_changed()
#7 nm_device_unrealize()
#8 _platform_link_cb_idle()
#9 g_main_context_dispatch()
#10 g_main_context_dispatch()
#11 g_main_context_iterate()
#12 g_main_loop_run()
#13 main()
Upon slave removal we unrealize the device, resetting the unmanaged
flags to NM_UNMANAGED_PLATFORM_INIT, then we clean up the device and
call nm_device_master_release_one_slave(), which asserts the presence
of NM_UNMANAGED_IS_SLAVE flag cleared just before.
Drop the check.
Fixes: 87a3df2e572ed47b5f76f6d1cad63ce622296e21
|
|
|
|
|
|
|
| |
Debian added an epoch "2" to the version of NSS library. Fix configure
to account for that.
Related: https://launchpad.net/debian/sid/+source/nss
|
|
|
|
| |
And call all tests via g_test_run().
|
| |
|
|
|
|
|
| |
Nothing too sophisticated; just a simple way to get an color-less output on a
pty that wouldn't confuse the test suite.
|
|
|
|
|
|
|
|
| |
Since the device-for-all merge it's a sin (trips an assert) to create an
activation request with NULL device.
If we get here, it's probably that the master device exists, but is not ready
for activation (it's in UNMANAGED state in the process of being created).
|
|\
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=762154
|
| | |
|
| |
| |
| |
| |
| |
| | |
Factories that overwrite this function are not supposed to chain
up the parent implementation. Thus there is no reason to have
a default implementation and it's clearer to inline it.
|
| |
| |
| |
| | |
Only lookup the factory once and pass it down to find_parent_device_for_connection().
|
| |
| |
| |
| | |
Generic check_connection_compatible() already does the check.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We not only want to check the device name when creating a virtual device, but
also when determining if the connection can actually be activated there.
Otherwise the device names will mix up if there's more connections that use
virtual devices of the same type.
|
| |
| |
| |
| |
| | |
We'll need the actual device name that should be used for a connection
activated on a given device when checking the connection availability.
|
| |
| |
| |
| |
| |
| |
| | |
interface name
This makes things a bit simpler when determining if any connection is
activatable on an existing device.
|
|/
|
|
| |
get_connection_iface()
|
|
|
|
| |
Fixes: 174b25d98c3ae395f5b41fc2e7d5c222cb6369cf
|
|
|
|
|
|
| |
nm_platform_link_inet6_addrgenmode2str()
There is a new address generation mode.
|
|
|
|
|
|
|
| |
Reuse the to-string function nm_platform_link_inet6_addrgenmode2str() to print the
addrgenmode for nm_platform_link_to_string().
Also, now we support NM_IN6_ADDR_GEN_MODE_STABLE_PRIVACY.
|
|
|
|
| |
nm_platform_link_tun_get_properties_ifname()
|
|
|
|
| |
to --no-dist
|
|
|
|
|
|
|
|
| |
"nm-default.h" should only include all the relevant header files based
on NETWORKMANAGER_COMPILATION. It should not contain definitions on
it's own.
Move the definition of "bool" to "nm-macros-internal.h".
|
|
|
|
| |
Fixes: 1762d58a8cf7fbd21b6940fb2a15c136952a9603
|
|\
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=761959
|
| |
| |
| |
| |
| | |
Now, that we no longer overwrite @err, we can jump to stop: instead
of out:.
|
| |
| |
| |
| |
| |
| | |
If we break the loop normally, @err must be already set to zero.
The only other way this can happen is when the credentials are
invalid. Move setting @err to there.
|
| |
| |
| |
| |
| |
| | |
If @handle_events is FALSE, we want to drain the socket. In that case
even when encountering an error error we don't want to abort, but instead
continue reading the next message.
|
| |
| |
| |
| |
| |
| | |
@abort_parsing is set TRUE at two places, which also explicitly
set @err to something. We don't want to reset @err and got to the
next @hdr. Instead error out first.
|
| |
| |
| |
| | |
Doesn't seem important and might be triggered by other processes.
|
| |
| |
| |
| |
| |
| | |
The value is not used by the callers. Also, with @handle_events set
to false, it is not clear what the value really means because we skip
over errors.
|
| | |
|
|/
|
|
|
| |
Similar to gs_free to cleanup pointers with free(). Note that
g_free() and free() cannot be used interchangably.
|
|
|
|
|
| |
When building fails, we should not run the tests. They clutter
the output.
|
|
|
|
|
|
|
|
| |
Unenslaving from a bridge can cause a spurious RTM_DELLINK signal.
NMPlatform does raise those signals, but fixes the state of the
cache afterwards. Workaround the test failure.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1285719
|
|\
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=761464
|
| |
| |
| |
| | |
Fixes: 3f0d595cc827d9e1117bc5c796aa11185ba8c5d7
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change the dhcp-timeout property in NMSettingIPConfig to int type for
consistency with the dad-timeout property. For dad-timeout -1 means
"use default value", while for dhcp-timeout probably we will never use
negative values, but it seems more correct to use the same type for
the two properties.
|
|/
|
|
|
| |
The property applies to both IPv4 and IPv6 and so it should not be in
NMSettingIP4Config but in the base class.
|
|\
| |
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=760884
https://bugzilla.gnome.org/show_bug.cgi?id=761714
|
| | |
|
| |
| |
| |
| |
| | |
Thereby, also adjust the type for libnm's wrapper function -- as
we already broke ABI.
|
| | |
|