This patch makes NM set the "accept_ra" sysctl to 1 rather than 2. This
causes the kernel to process RAs even if it configured to forward IPv6
traffic on the interface in question.
IPv6 forwarding would likely be enabled on a host running virtualised
operating systems with virtualised network adapters, for example. This
should not prevent NM from successfully activating IPv6 on a
NM-controlled interface configured with IPv6 mode Auto.
This commit improves the handling of rfkill.
- The original two passes check gathers the states of platform
and non-platform switches in two separate loops. Now we gather
the both states in one loop and determine the final states later.
- A new rule is used to determine the states of switches.
if (platform_state == UNBLOCKED)
choose non_platform_state;
else
choose platform_state;
The state is UNBLOCKED if and only if both the platform and
non-platform switches are unblocked, so the ambiguous state in
bgo#655773 will not happen.
Original code always preferred the platform switch state over
the device switch state, so if the platform switch was UNBLOCKED
but the device was BLOCKED, NM would treat the device as
UNBLOCKED and try to activate it, and obviously fail.
NM already includes <linux/if.h> in some places, f.e. nm-netlink-monitor and
we can't mix usage of the two. Stick to using <linux/if.h> as it provides
additional flag definitions such as operational link state and link mode.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
NM not only depends on libnl but also on libnl-route. Therefore check for the
corresponding pkg-config file and use its CFLAGS and LIBS. Otherwise fall
back to using libnl-2 or libnl-1.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Check for libnl3 sets $have_libnl2 variable instead of $have_libnl3. Mostly a
cosmetic fix since the only usage also has the typo in it.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
More recent libnl versions can be installed in parallel. Therefore it is
possible for more than one libnl check to pass successful. The way
the #ifdefs are done this results in code for multiple libnl versions
to be included.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
SSIDs don't want NULL termination, but some of the certificate code
checked for it. New-style plain strings would never be NULL
terminated (by accident) so fix that and make the code simpler too.
Found by Gary Ching-Pang Lin <chingpang@gmail.com>
Active VPN connections exported their own active path instead of active path of
base connection in 'SpecificObject' property. It's a regression caused by commit
bc6fc7b910 that split VPN connections to
NMVPNConnectionBase and NMVPNConnection.
Previously, specific object used to be obtained from NMActRequest of parent
connection. The NMActRequest object served also for getting secrets. Commits
0e6a5365d4 and 832e64f8bc
removed NMActRequest from VPN connection because it's not necessary any more.
This commit fixes the issue by passing specific object path explicitly.
OLPC Mesh code now doesn't have to be updated every time we change
the manager's creation arguments. We could make all these arguments
GObject properties of the manager too, but that's more code and
we'd eventually like to figure out a better solution for letting
non-NMManager code listen for device addition/removal.
When a default wired connection is saved, it gets deleted first since it
has to be re-created using a settings plugin. But with the settings
rework in 0.9, default wired refcounting changed and the default
wired connection wasn't kept alive in default_wired_try_update()
over the removal/readd. This caused a use-after-free.
We are using the default cb set anyways. This allows running NM with
the NLCB=debug environment variable set to get some debug messages
out of libnl related to netlink communication.
NLCB=debug won't print received netlink messages as the MSG_IN
handler is in use by NM to verify message origins. It's probably
best to introduce new handlers in libnl for debugging purpose
so both use of MSG_IN and enable debugging is possible.
Flags are not getting set when a route is added (e.g. NLM_F_REPLACE).
Apparently this was fixed in Ubuntu, but I didn't see a patch here, so
here it is.
Verifies that provided message consists of at least the link message
header. nlmsg_parse() does this so it needs to be called prior to
accessing the message contents.