summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libnm: add Wi-Fi AP 'last-seen' propertydcbw/nm-1-0-wifi-ap-last-seenDan Williams2015-08-073-0/+46
|
* wifi: expose the last_seen property for a NMAccessPointMathieu Trudel-Lapierre2015-08-076-2/+78
| | | | https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00053.html
* core: add nm_utils_monotonic_timestamp_as_boottime() functionThomas Haller2015-08-073-5/+86
|
* device: fix memory leak in act_stage3_ip6_config_start()Beniamino Galvani2015-08-071-5/+0
| | | | | | | | | | If linklocal6_start() finds that the device already has an IPv6 link-local address and returns NM_ACT_STAGE_RETURN_FINISH, we don't need to fill @out_config with an empty configuration. A non-NULL @out_config is required only for ret = NM_ACT_STAGE_RETURN_SUCCESS. Fixes: 396dc2b3b40f9b33e9c55f8e72bb192739983476 (cherry picked from commit 54d10f0ec1af3a2ba2a95608703bebba4d04b638)
* platform/tests: fix assertion for test-link for team deviceThomas Haller2015-08-061-4/+1
| | | | | | | Seems that team changed to now also raise two change signals. Relax the assertion that broke tests on Fedora 22. (cherry picked from commit 1c2883c940917e558e604e7ab0eeb1275d24a939)
* device: merge branch 'th/device-ignore-auto-bgo752546'Thomas Haller2015-08-069-76/+111
|\ | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=752546 (cherry picked from commit 558117222fabd8244e3d01e281c6391967b273c3)
| * device: only 'ignore-auto-routes' and 'ignore-auto-dns' for certain settingsThomas Haller2015-08-061-40/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During merge_and_apply(), we merge several NMIPxConfig into a new @composite. For 'ignore-auto-routes' and 'ignore-auto-dns', we want to prevent certain routes/dns-settings to be merged. But it is wrong to reject settings from all partial configs. For example, especially ext_ipx_config and vpn_ipx_config contain routes that we still must merge and preserve. This was recently changed by 79630c11e502c3b0b958abc0b1b5d777a3db2a98 and previously by ab6548c62134518ba2871306397e7fb9c84260ca. But it was wrong for a long time already. Also note, that nm_ip4_config_merge() now also ignores NIS, WINS, and dns-options. https://bugzilla.gnome.org/show_bug.cgi?id=752546 Fixes: 79630c11e502c3b0b958abc0b1b5d777a3db2a98 (cherry picked from commit 43e6f6a1784f82a2e65d71fd4ab60415858ba823)
| * core: add @merge_flags argument to nm_ip4_config_merge() and ↵Thomas Haller2015-08-069-41/+67
|/ | | | | | | | | | | | | | | nm_ip6_config_merge() The new flags are not yet used, so there is no change in functionality. The flags NM_IP_CONFIG_MERGE_NO_ROUTES and NM_IP_CONFIG_MERGE_NO_DNS go together with the 'ignore-auto-routes' and 'ignore-auto-dns' setting. Note that for IPv4, NM_IP_CONFIG_MERGE_NO_DNS also ignores NIS, WINS, and dns-options. This is different from current other places that handle 'ignore-auto-dns' and only care about nameservers, domains, and searches. (cherry picked from commit f7a8962dd47099425438ee484e02f40e18b6ee79)
* device: lower serverity of MTU adjustment loggingLubomir Rintel2015-08-041-3/+3
| | | | | | Warn is probably too harsh, but we still need to log the reason for the change. (cherry picked from commit f7f9e734aa32cba19a174dad57686708331c0e18)
* device: don't modify the device MTU if it's unsetLubomir Rintel2015-08-041-3/+3
| | | | | | | | | | | | | | The MTU of 0 means default, not zero-length packets: <warn> (wlp3s0): Lowering IPv6 MTU (1472) to match device MTU (0) <warn> (wlp3s0): IPv6 MTU (0) smaller than 1280, adjusting <warn> (wlp3s0): Raising device MTU (0) to match IPv6 MTU (1280) <error> [1437068831.306733] [platform/nm-linux-platform.c:2440] sysctl_set(): platform-linux: sysctl: failed to set '/proc/sys/net/ipv6/conf/wlp3s0/mtu' to '1472': (22) Invalid argument Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=752508 (cherry picked from commit a92d8b0c678e17d1cc175c3aad50afb1443785d2)
* device: set Ethernet MTU for PPPoE connections in stage2/configBeniamino Galvani2015-08-041-0/+23
| | | | | | | | Try to set the MTU of the parent Ethernet interface to match the requested PPP MTU and MRU. This allows the negotiation of a PPP MTU and MRU greater than 1492. (cherry picked from commit 1d3eff45d2e1eb36edbb5170f321b01bc5fc0484)
* device: set MTU on IP interfaceBeniamino Galvani2015-08-041-1/+1
| | | | | Fixes: 7ba2a058f201ac237e2c5ddf6f513f8c306f314d (cherry picked from commit 0a04be41d4c08adb4eb5349201ca29562d061b89)
* libnm-core,libnm-util: drag in glib.h for nm-version.hLubomir Rintel2015-07-232-0/+4
| | | | | | G_UNAVAILABLE defines need it. Fix building of the Qt example.
* default-route: merge branch 'th/default-route-on-unmanaged-device-rh1244483'Thomas Haller2015-07-227-55/+110
|\ | | | | | | | | | | | | | | | | Fix wrongly managing the default-route on unmanaged devices. Also, improve handling for p2p link with an 0.0.0.0 IPv4 gateway. https://bugzilla.redhat.com/show_bug.cgi?id=1244483 (cherry picked from commit 7243c9f3d4d0c0d0508c9bed326eea99336196bd)
| * libnm-core: don't assert against non-NULL @ip argument to canonicalize_ip()Thomas Haller2015-07-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove an assertion in canonicalize_ip() to assert that either a non-NULL @ip is given, or @null_any is TRUE. The condition of the assert is not easy to understand without context. Instead the caller should already handle %NULL properly. All callers that pass @null_any=FALSE to canonicalize_ip(), already assert that the argument is not %NULL. With the exception of nm_ip_route_new() which however checks for a valid @dest early on. (cherry picked from commit 7f129b976cf175ef7d3d75227761d14afad69dd3)
| * libnm-core: 0.0.0.0 is a valid gateway tooLubomir Rintel2015-07-221-1/+1
| | | | | | | | | | | | | | It makes sense for point-to point links. https://bugzilla.redhat.com/show_bug.cgi?id=1244483 (cherry picked from commit f14fd048ff84794f72892a1fe0209d56552b0e6e)
| * libnm-core: fix nm-setting-ip-config.c:valid_ip() to handle %NULL argumentThomas Haller2015-07-221-0/+5
| | | | | | | | | | | | | | | | We call valid_ip() from nm_ip_route_new() to check whether an untrusted string is a valid ip address. Properly handle %NULL argument. Fixes: 21c8a6b20effbe1e689505a0cbb23594be06068c (cherry picked from commit 93425686947127e5bfc2d00521b35c4b75340ee5)
| * libnm-core: properly handle %NULL @ip in nm_utils_ipaddr_valid()Thomas Haller2015-07-221-0/+3
| | | | | | | | | | | | | | | | A is_valid() function should just accept NULL as input and return "invalid". It certainly should not crash. Fixes: 21c8a6b20effbe1e689505a0cbb23594be06068c (cherry picked from commit 2b55de856027657e567914361f501bbfbca050b4)
| * ip4-config: 0.0.0.0 is a valid gateway tooLubomir Rintel2015-07-224-20/+53
| | | | | | | | | | | | | | It makes sense for point-to point links. https://bugzilla.redhat.com/show_bug.cgi?id=1244483 (cherry picked from commit 063677101ab7d43a9aa94c70eb1ca3a201269043)
| * default-route-manager: pick up platform changes after NMDeviceLubomir Rintel2015-07-221-1/+3
| | | | | | | | | | | | | | | | If a default route is configured externally, we want the device to pick the change and register it with the default-route-manager first. https://bugzilla.redhat.com/show_bug.cgi?id=1244483 (cherry picked from commit e67b52ed16afebce538f2f1844cf6e854e27c64d)
| * device: always assume default-route for generate-assumed-connectionsThomas Haller2015-07-221-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d51975e changed, that we treat assumed and non-assumed connections the same with respect to the default route. This is certainly wrong, if we have an nm-generated-assumed connection at hand. In this case, NM just generated a connection based on what was configured on the system. Looking at that result and re-enforcing the default-route is wrong. We want to manage the default-route for assumed, persistent connections. If the connection was assumed and generated, we do not. This commit reverts d51975ed for nm-generated-assumed connection and restores the previous behavior. https://bugzilla.redhat.com/show_bug.cgi?id=1244483 Fixes: d51975ed921a5876b76e081b8f3df4e2ca1f1ca9 (cherry picked from commit bebeff69e89de04fdd53e21a0edb5d1fbfbfcf0b)
| * device: move setting v4_commit_first_time/v6_commit_first_time to the end of ↵Thomas Haller2015-07-221-10/+13
| | | | | | | | | | | | merge_and_apply() (cherry picked from commit cbd246c9b04868ada07b4853753fdba26bca54f3)
| * device/trivial: rename private field in NMDevicePrivateThomas Haller2015-07-221-12/+15
|/ | | | | | | | | | | Rename "default_route.v4_configure_first_time" to "v4_commit_first_time". For one, the name "commit" matches better to the @commit variable in ip4_config_merge_and_apply() and ip6_config_merge_and_apply(). Then, we don't need this information only for default-routes, so move the variable out of the @default_route struct. (cherry picked from commit ad03cdbc73dad81aa8934afa2060ccbd9e776f7f)
* core: fix handling route-metric for nm_ip4_config_merge()Thomas Haller2015-07-222-2/+2
| | | | | Fixes: bc75cd53a8c5ba525016bfddc1644be59a45ed41 (cherry picked from commit 47cc91bef609fe6f0ec7c25deff0b0628842c240)
* core: detect route-metric when creating nm-generated-assumed connectionThomas Haller2015-07-224-2/+90
| | | | | | | | | | | | | | When generating a connection to assume it, also record the route-metric. Do that by looking at the metric of the (best) default-route. This is especially important since d51975ed921a5876b76e081b8f3df4e2ca1f1ca9. Now NM would also manage the default-route for assumed connections. So the generated assumed connection would have a route metric based on the device type, which might differ from the external configuration. This caused NM to replace the externally configured default-route. https://bugzilla.gnome.org/show_bug.cgi?id=750405 (cherry picked from commit bc75cd53a8c5ba525016bfddc1644be59a45ed41)
* cli: fix metered to string propertyThomas Haller2015-07-221-0/+11
| | | | | | | | nmc_property_connection_get_metered() must return non-localized strings that can be parsed by nmc_property_connection_set_metered(). Fixes: f0aebfd7462dea9b3ebc579a49248027f6d23905 (cherry picked from commit 5eba53cd53a25ebf104db2cfba1eddff0aa9edd6)
* merge branch 'bg/metered-connections-bgo741725'Beniamino Galvani2015-07-2238-12/+674
|\ | | | | | | | | | | | | | | | | | | | | Expose information about whether a connection is metered and use some heuristics to choose a reasonable default when the value is not configured. https://bugzilla.gnome.org/show_bug.cgi?id=741725 https://bugzilla.redhat.com/show_bug.cgi?id=1200452 (cherry picked from commit 7d09debdf0b1bd6d76a645d5195e89e3ad16892f)
| * nm-manager: add 'metered' propertyBeniamino Galvani2015-07-229-2/+141
| | | | | | | | | | | | | | | | This introduces a global metered property which makes easier for clients to obtain the metered status of the current primary connection. (cherry picked from commit 04d5804dd5826cc36398027a023b0e639a54bd26)
| * cli: fix error message localizationBeniamino Galvani2015-07-221-2/+8
| | | | | | | | | | | | | | Valid values must not be translated in error messages generated in nmc_string_to_bool() and nmc_string_to_tristate(). (cherry picked from commit bd4e1f37f88baddc743b79b68886112882deca9a)
| * ifcfg-rh: add support for CONNECTION_METEREDBeniamino Galvani2015-07-223-0/+28
| | | | | | | | (cherry picked from commit 7e5e624dafc9ad4e6ec2dc32cc0d7013476ca2c6)
| * ifcfg-rh: change type of svTrueValue() return value and argumentBeniamino Galvani2015-07-222-4/+4
| | | | | | | | | | | | | | | | Change type of return value and 'def' argument of svTrueValue() to gint to make clear that it can be something different from TRUE and FALSE. (cherry picked from commit 862fd91df06087257dfa2b647172bafc60328487)
| * core: update device 'metered' property on connection state changeBeniamino Galvani2015-07-221-1/+59
| | | | | | | | | | | | | | | | | | | | | | The metered property of a NMDevice that reaches the activated state is copied from the active connection and if its value is 'unknown' some heuristics are used to guess the actual value. When the connection is torn down the metered property is reset to 'unknown'. (cherry picked from commit a86255a0432b2ba88f5d629bffb79dd05bd7590a)
| * dhcp: detect NMIP4Config 'metered' flag based on ANDROID_METERED DHCP optionBeniamino Galvani2015-07-223-0/+35
| | | | | | | | | | | | | | | | | | Some versions of Android's DHCP server send option 43 (Vendor specific information) with value "ANDROID_METERED" in Wi-Fi hotspot mode. Mark the NMIP4Config as metered when such option is received. (cherry picked from commit 1e39b2320dfe42ca33dfbf12746d63935818ac5a)
| * systemd/dhcp: add support for vendor specific DHCP optionBeniamino Galvani2015-07-224-0/+56
| | | | | | | | | | | | | | | | | | This adds support for DHCP option 43 (Vendor Specific Information) to the internal DHCP client. The option carries an opaque object of n octets, interpreted by vendor-specific code on the clients and servers. (cherry picked from commit 3c2f4a17f9255e2c6da6e6122159a9f993b80480)
| * core: add 'metered' flag to NMIP4ConfigBeniamino Galvani2015-07-222-0/+34
| | | | | | | | | | | | | | | | | | Some DHCP servers send specific options to give a hint that clients should avoid unneeded data usage. Add a metered flag to NMIP4Config to keep track of this information. (cherry picked from commit 68db65b727bdfb7e560a82566348a256b848bbde)
| * cli: add support for 'metered' connection propertyBeniamino Galvani2015-07-221-1/+56
| | | | | | | | (cherry picked from commit f0aebfd7462dea9b3ebc579a49248027f6d23905)
| * cli: add nmc_string_to_tristate()Beniamino Galvani2015-07-222-0/+37
| | | | | | | | (cherry picked from commit 609f4f37c0db111e7f9e2f452e0d442b41aa0298)
| * libnm-core: add 'metered' property to NMSettingConnectionBeniamino Galvani2015-07-224-0/+57
| | | | | | | | | | | | | | | | Add a 'metered' enum property to NMSettingConnection with possible values: unknown,yes,no. The value indicates the presence of limitations in the amount of traffic flowing through the connection. (cherry picked from commit 6f647fe689ddc5102c7a4492740a96f043d4a478)
| * cli: add 'metered' property to deviceBeniamino Galvani2015-07-223-1/+22
| | | | | | | | (cherry picked from commit f208e7030f9b305bee4063d541163e47e2f51c06)
| * core,libnm: add 'metered' property to NMDeviceBeniamino Galvani2015-07-227-2/+138
|/ | | | (cherry picked from commit bbbf5229413f364dba8646ca582f41e7eef513d5)
* build: add NM_AVAILABLE_IN_1_0_6 defineBeniamino Galvani2015-07-221-0/+6
|
* device: prefer wifi over wwan by defaultTore Anderson2015-07-221-4/+4
| | | | | | | | | | | | This makes wifi preferred to wwan (the modem and bluetooth device types to be specific) by default, so that users that care about being connected at all times can keep both enabled with auto-connect. As wifi is usually unmetered and often faster than wwan, it makes sense to prefer it. This is also how pretty much every smart-phone in the world behaves, so it aligns better with user expectations too. https://bugzilla.gnome.org/show_bug.cgi?id=744754 (cherry picked from commit 3efb6740fcdd51a4381d7bb4792b9424423fa5a5)
* cli: fix verifying flag-based properties (rh #1244048)Jiří Klimeš2015-07-171-3/+63
| | | | | | | | | | | | | | | | Some of the properties changed from GParamSpecUInt to GParamSpecFlags, namely NM_SETTING_VLAN_FLAGS NM_SETTING_DCB_APP_FCOE_FLAGS NM_SETTING_DCB_APP_ISCSI_FLAGS NM_SETTING_DCB_APP_FIP_FLAGS NM_SETTING_DCB_PRIORITY_FLOW_CONTROL_FLAGS NM_SETTING_DCB_PRIORITY_GROUP_FLAGS (commit fcfb4b40badbb5cd944cee0c9819cb2649d0bb58) https://bugzilla.redhat.com/show_bug.cgi?id=1244048 (cherry picked from commit 94b1b53a913650b5dd027181fecc08ce5ad8654d)
* docs: fix a copy/paste error in description of VLAN flagsJiří Klimeš2015-07-171-1/+1
| | | | (cherry picked from commit 2af10ef4442311f08f30afc358b203a11c4c12b0)
* merge: vpn: delay quitting when a new secrets request comes in (bgo #752237)Dan Williams2015-07-162-110/+76
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=752237
| * libnm/libnm-glib: don't quit in the middle of asking for secrets (bgo #752237)Dan Williams2015-07-162-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | If the VPN plugin terminated and the user started it again, then the quit timer will still be running and it sometimes happens that the VPN plugin will quit while the UI is asking the user for secrets. That's not very nice, so don't do that. Reproducer: while connect to the VPN, suspend your laptop. Then resume it, and immediately re-start the VPN connection. Watch the secrets dialog disappear within a very short time. https://bugzilla.gnome.org/show_bug.cgi?id=752237
| * libnm/libnm-glib: clean up VPN plugin timeoutsDan Williams2015-07-162-112/+50
|/ | | | Use nm_clear_g_source().
* connectivity: log warning when using https:// URIThomas Haller2015-07-161-1/+6
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=747866 (cherry picked from commit eab32a5252e82361a563154cd8bfc3949aaad119)
* connectivity: explicitly check for 511/Network Authentication Required ↵Dan Williams2015-07-161-15/+21
| | | | | | | | | | (RFC6585) (bgo #670394) If the response affirmatively indicates you're behind a portal, we might as well use that information. https://bugzilla.gnome.org/show_bug.cgi?id=670394 (cherry picked from commit 6a81daf1cb1fe68feb37296adcbcbcf7d2289d54)
* config/rpm: use plain HTTP URI for connectivity checkingThomas Haller2015-07-161-1/+1
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=747866 (cherry picked from commit 2a3a4eb16f9119bf434a28adc94c2684da8fd5e4)