summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: apply a loose IPv4 rp_filter when it would interfere with multihominglr/rp-filterLubomir Rintel2017-03-221-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | The IPv4 Strict Reverse Path Forwarding filter (RFC 3704) drops legitimate traffic when the same route is present on multiple interfaces, which is a pretty common scenario for IPv4 hosts. In particular, if the traffic is routable via multiple interfaces it drops traffic incoming via the device that has lower metric on the route to the originating network. Among other things, this disrupts existing connection when the user connected to the Internet via Wi-Fi activates a Wired Ethernet connection that also has a default route. Also, the Strict filter (and Reverse Path filters in general) provide practically no value to hosts that have a default route. The solution this patch uses is to detect scenarios where Strict filter is known to interfere and switch to a saner RP filter on the affected links. Routes to the same network on multiple interfaces is a good indication the RP filter would drop the legitimate traffice from the link with a lower metric. This includes the default routes. In such cases, we switch to the Loose Reverse Path Forwarding. This addresses the problems the multihomed hosts face, at the cost of disabling filtering altogether when a default route is present. A Feasible Path Reverse Path Forwarding would address the main problems with the Strict filter, but it's not implemented by the Linux kernel.
* device: add convenience routines for IPv4 sysctlsLubomir Rintel2017-03-221-0/+32
|
* route-manager: emit a signal when IPv4 routes changeLubomir Rintel2017-03-222-0/+18
| | | | The devices will use this to reconsider their RP filtering decisions.
* route-manager: add routine to query route shadowing for a linkLubomir Rintel2017-03-222-0/+28
| | | | | 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.
* ppp: only request IPV6CP when IPv6 is enabled in the connectionDan Williams2017-03-221-4/+12
| | | | | | | | | | | | | 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
* merge: branch 'lr/fg/libcurl_bgo752642'Lubomir Rintel2017-03-226-152/+341
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=752642
| * connectivity: switch connectivity checking to libcurllr/fg/libcurl_bgo752642Francesco Giudici2017-03-225-134/+303
| | | | | | | | | | | | | | [lkundrak@v3.sk: removed libsoup altogether, implemented TODOs and fixed the poll condition handling] Co-authored-by: Lubomir Rintel <lkundrak@v3.sk>
| * dns-manager: turn DOMAIN_IS_VALID into a functionLubomir Rintel2017-03-221-15/+24
| |
| * dns-manager: use libpsl directlyLubomir Rintel2017-03-225-11/+22
|/ | | | | ...instead of via libsoup. This makes it possible to do gTLD suffix checking even if we're building without libsoup support.
* core,libnm-core: use same route attribute names of iproute2Beniamino Galvani2017-03-2210-47/+47
| | | | | | | Users are probably more familiar with iproute2 route option names than kernel ones. Fixes: 54e58eb96bbfcd26d31ddba2e98ff2c59335a02a
* Merge branch 'bg/wext-refresh-ifname-bgo779788'Beniamino Galvani2017-03-219-163/+234
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=779788
| * wifi-utils: nl80211: use logging macrosBeniamino Galvani2017-03-211-25/+35
| |
| * wifi-utils: wext: use logging macrosBeniamino Galvani2017-03-211-80/+89
| |
| * shared: increase max number of args for _NM_UTILS_MACRO_RESTBeniamino Galvani2017-03-211-2/+4
| | | | | | | | 30 should be enough for anybody.
| * wifi-utils: fix use of errnoBeniamino Galvani2017-03-211-1/+3
| | | | | | | | It can be overwritten when other arguments are evaluated.
| * wifi-utils: don't cache interface nameBeniamino Galvani2017-03-218-95/+143
|/ | | | | | | 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.
* libnm: fix emission of NMActiveConnection::state notify signalBeniamino Galvani2017-03-211-0/+1
| | | | | | | | | | | | | | 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: 40ffb962bec3700e447254d4a1cc93f21b8a25dd https://bugzilla.redhat.com/show_bug.cgi?id=1433883
* po: make update-poThomas Haller2017-03-212-520/+380
|
* po: update Polish (pl) translation (bgo #780277)Piotr Drąg2017-03-211-249/+400
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780277
* po: update Ukrainian (uk) translation (bgo#780201)Yuri Chornoivan2017-03-211-504/+843
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780201
* po: import Zanata translationsThomas Haller2017-03-2166-79098/+90693
|
* manager: ensure proper disposal of unrealized devicesBeniamino Galvani2017-03-211-0/+5
| | | | | | | | 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
* libnm/nm-vpn-connection: un-deprecate the NMVpnStateReason use in a headerThomas Haller2017-03-201-0/+2
| | | | | Otherwise merely including a header would trigger a deprecation warhing. The signal slot is not really used anyway.
* libnm: fix memleak of GUdevDevice in get_bus_name()Thomas Haller2017-03-202-0/+2
| | | | Fixes: f7b1b2820245aff26da0c2c946b55752e91112e5
* doc: fix generate-setting-docs.py for supporting Python 3 sorted() styleThomas Haller2017-03-201-7/+4
| | | | | | Python 3 has no "cmp" argument to sorted(). Fixes: b0da972f5fa51608cca5837af9fe7094818204f8
* device: add spec "driver:" to match devicesThomas Haller2017-03-177-2/+93
| | | | | | | | 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
* all: fix typos in documentation and commentsYuri Chornoivan2017-03-179-17/+17
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=780199 [thaller@redhat.com: reworded commit message]
* libnm: revert coercing NMVpnConnectionStateReason to ↵Thomas Haller2017-03-173-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: a91369f80d44d1fc748fc3a9f5d9ef0fb566c77c
* trivial/whitespace: remove non-leading tabsThomas Haller2017-03-171-12/+12
|
* libnm: fix chaining up NMActiveConnection::constructed()Thomas Haller2017-03-171-0/+2
| | | | Fixes: 40ffb962bec3700e447254d4a1cc93f21b8a25dd
* merge: branch 'lr/active-connection-state-changed'Lubomir Rintel2017-03-1721-262/+408
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=779627
| * vpn-connection: use NMActiveConnectionStateReasonlr/active-connection-state-changedLubomir Rintel2017-03-176-45/+45
| |
| * libnm-core: drop NMVpnConnectionStateReasonLubomir Rintel2017-03-174-13/+35
| | | | | | | | | | It's now the same as NMActiveConnectionStateReason. Keep a compatibility typedef and enum.
| * vpn-connection: drop reason_to_stringLubomir Rintel2017-03-171-19/+0
| | | | | | | | | | | | 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.
| * fixup! libnm/active-connection: track reason for state changesLubomir Rintel2017-03-172-1/+13
| |
| * cli/connections: decide about activation success and failure in single placeLubomir Rintel2017-03-171-159/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * libnm/active-connection: track reason for state changesLubomir Rintel2017-03-175-16/+86
| | | | | | | | | | | | | | | | | | 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.
| * active-connection: emit a StateChanged signal on state changesLubomir Rintel2017-03-179-11/+113
| | | | | | | | | | | | | | | | 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.
| * libnm-core/trivial: include literals next to NMVPNStateReason valuesLubomir Rintel2017-03-171-12/+12
| | | | | | | | | | Makes it slightly more readable, useful when we copy it to NMActiveConnectionStateReason.
| * device: cast enum types for variadic g_signal_emit() functionThomas Haller2017-03-171-1/+1
|/
* merge: branch 'lr/api-docs'Lubomir Rintel2017-03-1778-132/+595
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=779934
| * docs/libnm: add some more documentationlr/api-docsLubomir Rintel2017-03-171-18/+124
| |
| * docs/api: restructureLubomir Rintel2017-03-171-29/+105
| | | | | | | | | | This splits the manual into parts and groups the D-Bus interfaces into chapters by the object class. It looks considerably better.
| * docs/api: move D-Bus reference after nm-settingsLubomir Rintel2017-03-171-57/+57
| |
| * docs/api: make the connection settings look betterLubomir Rintel2017-03-172-22/+44
| | | | | | | | | | 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.
| * docs/api: add abstractLubomir Rintel2017-03-171-0/+20
| |
| * docs/api: add standard release informationLubomir Rintel2017-03-171-1/+5
| |
| * docs/api: reorder the manual pagesLubomir Rintel2017-03-171-4/+4
| | | | | | | | I guess the daemon and its configuration first makes most sense.
| * man: include the description for settingsLubomir Rintel2017-03-171-15/+18
| |
| * libnm/generate-setting-docs.py: include description attributeLubomir Rintel2017-03-171-3/+6
| |