Commit Graph

18368 Commits

Author SHA1 Message Date
Lubomir Rintel
56e7e657b6 device: add convenience routines for IPv4 sysctls 2017-03-22 12:21:39 +01:00
Lubomir Rintel
1b60b76871 route-manager: emit a signal when IPv4 routes change
The devices will use this to reconsider their RP filtering decisions.
2017-03-22 12:21:39 +01:00
Lubomir Rintel
75faf5bb77 route-manager: add routine to query route shadowing for a link
If a route is shadowed by another route to the same network it's a good
indication we're multihoming and want to disable the Strict RP filtering.
2017-03-22 12:21:39 +01:00
Dan Williams
8d4570d28d ppp: only request IPV6CP when IPv6 is enabled in the connection
NM always asks pppd to run IPV6CP which will complete if the modem supports
IPv6.  If the user doesn't want IPv6 then NM just ignores the result.  But
if the host has disabled IPv6, then pppd will fail to complete the connection
because pppd tries to assign the Link-Local address to the pppX interface,
and if IPv6 is disabled that fails and terminates the PPP session.

So only request IPV6CP when the user wants IPv6 on the connection; if they
have disabled IPv6 on their host then they can simply set ipv6.method=ignore.

https://mail.gnome.org/archives/networkmanager-list/2017-March/msg00047.html
2017-03-22 12:20:25 +01:00
Lubomir Rintel
7d8f489933 merge: branch 'lr/fg/libcurl_bgo752642'
https://bugzilla.gnome.org/show_bug.cgi?id=752642
2017-03-22 12:09:49 +01:00
Francesco Giudici
7307dea9c4 connectivity: switch connectivity checking to libcurl
[lkundrak@v3.sk: removed libsoup altogether, implemented TODOs and fixed
the poll condition handling]

Co-authored-by: Lubomir Rintel <lkundrak@v3.sk>
2017-03-22 12:09:39 +01:00
Lubomir Rintel
724b600a71 dns-manager: turn DOMAIN_IS_VALID into a function 2017-03-22 12:09:39 +01:00
Lubomir Rintel
c05befd5aa dns-manager: use libpsl directly
...instead of via libsoup. This makes it possible to do gTLD suffix checking
even if we're building without libsoup support.
2017-03-22 12:09:39 +01:00
Beniamino Galvani
80dfb8cdab core,libnm-core: use same route attribute names of iproute2
Users are probably more familiar with iproute2 route option names than
kernel ones.

Fixes: 54e58eb96b
2017-03-22 12:04:25 +01:00
Beniamino Galvani
d3b1e08c9a Merge branch 'bg/wext-refresh-ifname-bgo779788'
https://bugzilla.gnome.org/show_bug.cgi?id=779788
2017-03-21 18:51:38 +01:00
Beniamino Galvani
c26471e7de wifi-utils: nl80211: use logging macros 2017-03-21 18:46:52 +01:00
Beniamino Galvani
dda2b84ccc wifi-utils: wext: use logging macros 2017-03-21 18:46:52 +01:00
Beniamino Galvani
f4a8a7f2a6 shared: increase max number of args for _NM_UTILS_MACRO_REST
30 should be enough for anybody.
2017-03-21 18:46:52 +01:00
Beniamino Galvani
ed8da2cd25 wifi-utils: fix use of errno
It can be overwritten when other arguments are evaluated.
2017-03-21 18:46:52 +01:00
Beniamino Galvani
3860c2fbe3 wifi-utils: don't cache interface name
For nl80211, we don't care about the interface name and only use it
when formatting error messages. For wext, an up-to-date interface name
should be obtained every time to minimize the chance of race
conditions when the interface is renamed.
2017-03-21 18:46:52 +01:00
Beniamino Galvani
7de4912ff0 libnm: fix emission of NMActiveConnection::state notify signal
state_changed_proxy() updates the value of @state and must also emit
the notify signal for it.

Without this, when the PropertiesChanged signal carrying the change of
'state' arrives after StateChanged, we notice that the value of @state
doesn't change and don't emit the notify, causing a loss of the state
change event.

Fixes: 40ffb962be

https://bugzilla.redhat.com/show_bug.cgi?id=1433883
2017-03-21 17:52:58 +01:00
Thomas Haller
9749fdbf34 po: make update-po 2017-03-21 15:07:17 +01:00
Piotr Drąg
531b05f3d6 po: update Polish (pl) translation (bgo #780277)
https://bugzilla.gnome.org/show_bug.cgi?id=780277
2017-03-21 14:58:08 +01:00
Yuri Chornoivan
e2c526f071 po: update Ukrainian (uk) translation (bgo#780201)
https://bugzilla.gnome.org/show_bug.cgi?id=780201
2017-03-21 14:55:24 +01:00
Thomas Haller
6c2895f875 po: import Zanata translations 2017-03-21 14:55:00 +01:00
Beniamino Galvani
2e0c3d1dac manager: ensure proper disposal of unrealized devices
When remove_device() is called on an already unrealized device, we
should release it from master if necessary and clear its IP
configurations to avoid leaks.

https://bugzilla.redhat.com/show_bug.cgi?id=1433303
2017-03-21 13:25:36 +01:00
Thomas Haller
714504faf2 libnm/nm-vpn-connection: un-deprecate the NMVpnStateReason use in a header
Otherwise merely including a header would trigger a deprecation warhing.
The signal slot is not really used anyway.
2017-03-20 14:51:11 +01:00
Thomas Haller
c033330c41 libnm: fix memleak of GUdevDevice in get_bus_name()
Fixes: f7b1b28202
2017-03-20 11:28:58 +01:00
Thomas Haller
b33b15ae76 doc: fix generate-setting-docs.py for supporting Python 3 sorted() style
Python 3 has no "cmp" argument to sorted().

Fixes: b0da972f5f
2017-03-20 11:12:40 +01:00
Thomas Haller
b869d9cc0d device: add spec "driver:" to match devices
Changing the MAC address of devices is known to fail with
certain drivers. Add a device-spec to allow disabling it
for for such devices.

Related: https://bugzilla.gnome.org/show_bug.cgi?id=777523
2017-03-17 17:40:00 +01:00
Yuri Chornoivan
4c6edb22b7 all: fix typos in documentation and comments
https://bugzilla.gnome.org/show_bug.cgi?id=780199

[thaller@redhat.com: reworded commit message]
2017-03-17 15:11:20 +01:00
Thomas Haller
5022e3b8ee libnm: revert coercing NMVpnConnectionStateReason to NMActiveConnectionStateReason
NMVpnConnectionStateReason is no longer used and replaced by
NMActiveConnectionStateReason. However, the old enums should
stay in place as they were:

Otherwise:
  #define NMVpnConnectionStateReason NMActiveConnectionStateReason
causes compiler warnings:
  NMVpnConnectionStateReason x;
  x = NM_VPN_CONNECTION_STATE_REASON_UNKNOWN;             // -Wenum-conversion
  if (x == NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS) { } // -Wenum-compare

Similarly, a user who didn't upgrade shall continue to get the
old GType for NM_TYPE_VPN_CONNECTION_STATE_REASON.

In practice, old users will have no issues using the old enum
the places where it worked before.
The only use of the deprecated enum is in vpn_state_changed()
signal slot of NMVpnConnection. This makes the signal slot
itself deprecated. However, NMVpnConnection is an NMObject and commonly
created within libnm itself, not by the user. It is very unlikely that
a user of libnm subclassed NMVpnConnection and makes use of the
vpn_state_changed() signal slot. So, deprecate it without replacement.

Fixes: a91369f80d
2017-03-17 13:00:32 +01:00
Thomas Haller
e65aa9e6ff trivial/whitespace: remove non-leading tabs 2017-03-17 10:58:33 +01:00
Thomas Haller
fa262e3dc4 libnm: fix chaining up NMActiveConnection::constructed()
Fixes: 40ffb962be
2017-03-17 10:50:42 +01:00
Lubomir Rintel
1e4f1892e0 merge: branch 'lr/active-connection-state-changed'
https://bugzilla.gnome.org/show_bug.cgi?id=779627
2017-03-17 10:21:57 +01:00
Lubomir Rintel
d190ca487f vpn-connection: use NMActiveConnectionStateReason 2017-03-17 10:21:19 +01:00
Lubomir Rintel
a91369f80d libnm-core: drop NMVpnConnectionStateReason
It's now the same as NMActiveConnectionStateReason. Keep a compatibility
typedef and enum.
2017-03-17 10:21:19 +01:00
Lubomir Rintel
d9d78ac2aa vpn-connection: drop reason_to_string
It's utterly useless: the textual version of the reason if logged only if
the plugin fails; but the plugin failure already logs the plugin state
change reason which is directly translated to the connection one.
2017-03-17 10:21:19 +01:00
Lubomir Rintel
c61c16513e fixup! libnm/active-connection: track reason for state changes 2017-03-17 10:21:19 +01:00
Lubomir Rintel
57a26fd2aa cli/connections: decide about activation success and failure in single place
Track both device and active connections at the same time and decide
whether activation finished (either successfully or not) in a single
place, check_activated().

This makes the already too complex code path a bit more straightforward
and also makes it possible to be more reasonable about the diagnostics.

Now that the active connection signals the reason, we include it; but if
the failure is due to the device disconnection while we're activating,
include a device reason instead, since it's often more useful. Like:

Before:
  Error: Connection activation failed.

Without considering the device:
  Error: Connection activation failed: the base network connection was interrupted

After:
  Error: Connection activation failed: The Wi-Fi network could not be found
2017-03-17 10:21:19 +01:00
Lubomir Rintel
40ffb962be libnm/active-connection: track reason for state changes
Note that the reason tracking starts as soon as the object exists (which
is immediately after GDBusObject is created), not when the asynchronous
NMObject initialization finishes. That is so that we the reason changes
in between are not lost.

The vpn-connection should probably be doing the same.
2017-03-17 10:21:19 +01:00
Lubomir Rintel
8b649a8c84 active-connection: emit a StateChanged signal on state changes
It includes a reason code that makes it possible for the clients to be
more reasonable about error messages.

The reason code is essentially copied from the VPN, plus three more
reasons that were useful for non-VPN connections.
2017-03-17 10:21:19 +01:00
Lubomir Rintel
67688fd2e5 libnm-core/trivial: include literals next to NMVPNStateReason values
Makes it slightly more readable, useful when we copy it to
NMActiveConnectionStateReason.
2017-03-17 10:21:19 +01:00
Thomas Haller
2e5ff63e1d device: cast enum types for variadic g_signal_emit() function 2017-03-17 10:21:19 +01:00
Lubomir Rintel
6da6318e88 merge: branch 'lr/api-docs'
https://bugzilla.gnome.org/show_bug.cgi?id=779934
2017-03-17 10:15:19 +01:00
Lubomir Rintel
a1cf9f4339 docs/libnm: add some more documentation 2017-03-17 10:15:11 +01:00
Lubomir Rintel
374abc3f50 docs/api: restructure
This splits the manual into parts and groups the D-Bus interfaces into chapters
by the object class. It looks considerably better.
2017-03-17 10:15:11 +01:00
Lubomir Rintel
967207f5bc docs/api: move D-Bus reference after nm-settings 2017-03-17 10:15:11 +01:00
Lubomir Rintel
c673c52101 docs/api: make the connection settings look better
Turn the it into a chapter with refentries to better fit the structure
of the table of contects. Also, include the properties in the index.
2017-03-17 10:15:11 +01:00
Lubomir Rintel
265269855b docs/api: add abstract 2017-03-17 10:15:11 +01:00
Lubomir Rintel
6926eaeb05 docs/api: add standard release information 2017-03-17 10:15:11 +01:00
Lubomir Rintel
74b6a015f7 docs/api: reorder the manual pages
I guess the daemon and its configuration first makes most sense.
2017-03-17 10:15:11 +01:00
Lubomir Rintel
96042c41f8 man: include the description for settings 2017-03-17 10:15:11 +01:00
Lubomir Rintel
a1c5f43501 libnm/generate-setting-docs.py: include description attribute 2017-03-17 10:15:11 +01:00
Lubomir Rintel
7bd69aa08d libnm-core: sensible docstrings for NMSettings* 2017-03-17 10:15:11 +01:00