summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ifcfg-rh: read custom IP address for shared connections (rh #1174632)jk/shared-ip-rh1174632Jiří Klimeš2015-01-124-3/+76
| | | | | | | | | | | | | | | | Custom IP ranges for shared connection were implemeted in bgo #6759732 (commit 32a001f526c182fa70ede92ffc360112eb7fe9c6). The first IP address is used and a range is calculated. However, the commit missed to update ifcfg-rh plugin to read the address. Test case: * use ifcfg-rh plugin for NetworkManager $ nmcli con add type eth con-name shared-ip ifname eth0 $ nmcli con mod shared-ip ipv4.addresses 9.8.7.6/24 ipv4.method shared $ nmcli con show shared-ip $ nmcli con show shared-ip <--- ip address 9.8.7.6 was missing https://bugzilla.redhat.com/show_bug.cgi?id=1174632
* keyfile: retry harder finding a suitable filename in writer()Thomas Haller2015-01-121-14/+24
| | | | | | | Try harder to find a suitable filename by appending a counter to the name. https://bugzilla.gnome.org/show_bug.cgi?id=740738
* core: merge branch 'th/singleton-bgo742450'Thomas Haller2015-01-1224-259/+176
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=742450
| * dbus: destroy singleton instance of NMDBusManager on exitThomas Haller2015-01-122-8/+6
| | | | | | | | | | | | Don't have the singleton instance of NMDBusManager owned by the main function. Instead use NM_DEFINE_SINGLETON_DESTRUCTOR() which also logs what's happening.
| * auth: destroy singleton instance of NMAuthManager on exitThomas Haller2015-01-121-16/+6
| |
| * core: use NM_DEFINE_SINGLETON_GETTER() macroThomas Haller2015-01-122-23/+2
| |
| * core: declare nm_agent_manager_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-124-45/+48
| | | | | | | | | | | | | | | | | | Also move the initilization of the instance into the constructed() method. NMAgentManager now owns a reference to the DBUS manager and Auth manager and the dispose() function properly unregisters itself from both.
| * core: declare nm_supplicant_manager_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-124-22/+4
| |
| * core: declare nm_session_monitor_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-121-9/+2
| |
| * core: declare nm_firewall_manager_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-122-18/+1
| |
| * core: declare nm_inotify_helper_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-121-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor NMInotifyHelper to implement the singleton getter using NM_DEFINE_SINGLETON_GETTER(). For one this means that the getter no longer increments the reference count. This was anyway wrong, because no caller of nm_inotify_helper_get() unrefered the returned reference, hence leaking the singleton. Also, the getter can no longer fail to create the singleton instance. Note that none of the callers actually coped with a failure to get the singleton. Instead return an instance that does nothing. One downside (upside?) of this is that we only try once to initialize the inotify handle.
| * core: declare nm_vpn_manager_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-123-19/+2
| |
| * core: declare nm_dhcp_manager_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-123-21/+2
| |
| * core: declare nm_dns_manager_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-123-19/+3
| |
| * core: declare nm_sleep_monitor_get() using NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-123-26/+10
| | | | | | | | | | | | | | Also no longer increment the reference count in the getter and properly disconnect the signals in NMManager:dispose(). Also use the defines for the signal names instead of plain strings.
| * core/trivial: rename singleton variables according to default nameThomas Haller2015-01-124-28/+28
| |
| * all: add macro NM_DEFINE_SINGLETON_GETTER()Thomas Haller2015-01-121-0/+60
|/
* trivial: whitespace fixThomas Haller2015-01-111-1/+1
|
* core: merge branch 'th/route-fixes-bgo741871'Thomas Haller2015-01-118-6/+75
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=741871
| * platform: workaround deletion of IPv4 route with metric 0Thomas Haller2015-01-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting routes with metric 0 might end up deleting other routes with a different metric. Workaround this in platform to only delete a route with metric 0 if such a route can be found prior to deletion. Don't only look into the cache (which might be out of date). Instead refetch the route we are about to delete to be sure. There is still a race that we might end up deleting the wrong route. https://bugzilla.gnome.org/show_bug.cgi?id=741871 https://bugzilla.redhat.com/show_bug.cgi?id=1172780
| * platform: route_search_cache() should not treat a metric 0 as "any" routeThomas Haller2015-01-111-1/+1
| | | | | | | | | | | | This match-any behavior ignoring metric is nowhere used. And even if we would need such a behavior, using 0 is wrong because IPv4 routes can have a metric of zero.
| * platform: fix IPv6 route methods for metric 0Thomas Haller2015-01-112-3/+10
| | | | | | | | | | | | | | Handling a route with metric 0 effectively means a metric of 1024 (user default). Adjust the add(), delete() and exist() functions to consider routes with metric 0 as 1024.
| * platform: fix data type for metric argument of refresh_route()Thomas Haller2015-01-111-1/+1
| |
| * ifcfg-rh: support ipvx.route-metric property as IPVX_ROUTE_METRICThomas Haller2015-01-106-1/+50
|/ | | | | | Write ipv4.route-metric and ipv6.route-metric property of NMSettingConnection as IPV4_ROUTE_METRIC and IPV6_ROUTE_METRIC, respectively.
* ifcfg-rh: fix invalid g_return_val_if_fail() argument in devtimeout_from_file()Thomas Haller2015-01-101-1/+1
| | | | Fixes: 62d870e1a6dd852e50f39b2a32cd291734766402
* contrib: remove dbus/dbus-glib requires from libnm sub-packageDan Williams2015-01-091-3/+0
| | | | libnm doesn't use dbus-glib or dbus at all.
* dbus: fix NMRUNDIR permissions on createDan Williams2015-01-091-1/+1
| | | | | | | | This is really a no-op because the directory will be created by nm_main_utils_check_pidfile() anyway, but make sure the permissions are synchronized. Now that resolv.conf is symlink into NMRUNDIR, if normal users don't have permissions to read NMRUNDIR then DNS won't work.
* core: force disable_ipv6=0 when turning on userspace IPv6LL (bgo #741773)Dan Williams2015-01-091-3/+4
| | | | | | | | | | | | | | | | | | If a device assumes a connection without activating a user-requested or NM-requested connection, then disable_ipv6 is not touched. When the device is deactivated, it still isn't touched even though userspace IPv6LL is enabled. This could lead to an user-requested activation with IPv6 configuration, but disable_ipv6=1. Whenever userspace IPv6LL is turned on, we should also set disable_ipv6=0 to ensure IPv6 can function. Userspace IPv6LL will ensure that the interface does not have an address until the user/connection requests it, which was the only reason that NM touched disable_ipv6 anyway. fixes:NetworkManager_Test203_testcase_286589 fixes:NetworkManager_Test204_testcase_286590 https://bugzilla.gnome.org/show_bug.cgi?id=741773
* keyfile: fix an uninitialized variableDan Winship2015-01-091-3/+2
| | | | | read_field() was supposed to set *error to NULL if there was no error, but it missed one case. (If **current was '\0'.)
* contrib: sync fedora/rpm/NetworkManager.specDan Winship2015-01-091-9/+0
| | | | We're building the plugins on s390 these days
* ifcfg-rh: merge branch danw/devtimeout-rh1171917Dan Winship2015-01-098-5/+253
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1171917
| * ifcfg-rh: handle DEVTIMEOUT property (rh #1171917)Dan Winship2015-01-093-1/+135
| | | | | | | | | | | | | | | | | | | | If an ifcfg file has a DEVTIMEOUT property (and a DEVICE, and is ONBOOT=yes), and the device is not present at startup, then wait up to DEVTIMEOUT seconds for it to appear before declaring the connection ready. This allows for a hacky workaround to devices that take a bizarrely long time to be probed.
| * core: allow connections to participate in NMManager:startup-completeDan Winship2015-01-095-4/+118
|/ | | | | | | Add an NMSettingsConnection:ready property, which indicates if the connection is ready to use. Add NMSettings:startup-complete, which is TRUE when all connections are ready. Make NMManager:startup-complete take NMSettings:startup-complete into account.
* keyfile: another cur at fixing the bridge testLubomir Rintel2015-01-093-3/+3
| | | | Fixes: 2f82bf537bb8179504cbe0a01fe94783a817a89f
* keyfile: fix bridge testLubomir Rintel2015-01-091-1/+1
| | | | Fixes: 2f82bf537bb8179504cbe0a01fe94783a817a89f
* bridge: Properly check range of STP properties (rh #1160815)Lubomir Rintel2015-01-091-1/+9
| | | | | | If zero is out of range, only allow it when STP is disabled. https://bugzilla.redhat.com/show_bug.cgi?id=1160815
* libnm-glib/nm-client: zero the CheckConnectivityData structureRui Matos2015-01-081-1/+1
| | | | | | | | Otherwise, if the caller doesn't provide a cancellable we'll try to access a bogus ccd->cancellable in check_connectivity_data_free() and crash. https://bugzilla.gnome.org/show_bug.cgi?id=740841
* team: improve handling of externally managed devices (rh #1172734)Lubomir Rintel2015-01-081-26/+47
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1172734
| * team: get configuration only when teamd appears on bus for externally added ↵lr/teamd-rh1172734Lubomir Rintel2015-01-081-21/+44
| | | | | | | | | | | | | | | | interfaces teamd first adds the link and only then listens on the bus therefore we race with it. Let's watch for the bus presence even for the teamd devices we didn't add for all their lifetime and recheck for assumed connections as we see them.
| * Revert "team: start teamd when ensuring team connection else ↵Lubomir Rintel2015-01-081-6/+4
|/ | | | | | | | | | | | | teamdctl_connect() fails" We don't want to start a teamd instance when there's an externally added team interface. We just don't want to try to the daemon if it's not there (addressed by a later commit). This reverts commit a78386b6d1a3d62063aa039d4ee9eba77c04a284. Conflicts: src/devices/team/nm-device-team.c
* libnm: fix documentation for nm_utils_file_search_in_paths()Thomas Haller2015-01-082-2/+2
|
* core: add /bin to the default search pathThomas Haller2015-01-081-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=742576
* build: fix --enable-lto configure option to allow disabling option explicitlyThomas Haller2015-01-081-2/+3
| | | | | | | | | | When specifying '--enable-lto=anything' or '--disable-lto', the configure script would always set enable_lto=yes. The only way to disable lto, was *not* specifying the configure option. https://bugzilla.gnome.org/show_bug.cgi?id=742575
* tests: check for no pending expected_messages on exit of testsThomas Haller2015-01-071-7/+8
| | | | | | | | | On the end of the test there should be no unchecked expected messages. Register a destructor function in nmtst to assert against that. Also call nmtst_free() in the destructor. That way, we always release the allocated data without requiring the test to do it explicitly.
* tui: fix crash when editing DSL connectionJiří Klimeš2015-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | Program received signal SIGSEGV, Segmentation fault. 0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109 109 priv->ethernet_page = nmt_page_ethernet_new (conn, nmt_editor_page_device_get_device_entry (NMT_EDITOR_PAGE_DEVICE (dsl))); Missing separate debuginfos, use: debuginfo-install libffi-3.0.10-3.fc18.x86_64 newt-0.52.15-1.fc19.x86_64 (gdb) bt #0 0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109 #1 0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16203872, n_parameters=n_parameters@entry=2, parameters=parameters@entry=0xf74350) at gobject.c:1741 #2 0x0000003e9ac16560 in g_object_new_valist (object_type=object_type@entry=16203872, first_property_name=first_property_name@entry=0x42e524 "connection", var_args=var_args@entry=0x7fffffffcef8) at gobject.c:1830 #3 0x0000003e9ac16894 in g_object_new (object_type=16203872, first_property_name=first_property_name@entry=0x42e524 "connection") at gobject.c:1545 #4 0x000000000041b504 in nmt_page_dsl_new (conn=<optimized out>, deventry=deventry@entry=0x974690 [NmtDeviceEntry]) at nmt-page-dsl.c:47 #5 0x000000000041808e in nmt_editor_constructed (object=<optimized out>) at nmt-editor.c:355 #6 0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16174256, n_parameters=n_parameters@entry=4, parameters=parameters@entry=0xf6cec0) at gobject.c:1741 ... (gdb) p priv $1 = (NmtPageDslPrivate *) 0x0
* ifcfg: refactor utils_get_ifcfg_name()Thomas Haller2015-01-071-21/+26
| | | | | | | | | | No need to allocate a temporary "base" variable. Just search for the last '/' ourselves. All the special handling that g_path_get_basename() does, for example handling empty filenames and removing trailing slashes, is not needed. Thereby fix not to return empty names such as from "ifcfg-".
* tui: fix saving "Available to all users" (rh #1176042)Jiří Klimeš2015-01-071-1/+1
|
* Revert "ifcfg-rh: avoid passing NULL error to connection_from_file_full()"Thomas Haller2015-01-061-8/+3
| | | | | | | | | This reverts commit 35988ec633bc7dc9a4f85b17b5a59f62645e0f7d. Since commit ffe0fde235aed7cf6341843adc1488995f8cc346, wireless_connection_from_ifcfg() accepts a missing @error argument. Revert this commit because the caller then can control whether to log the error by providing @error.
* session: prefer new configure optionsPavel Šimerda2015-01-061-11/+13
| | | | | | | | The main motivation for this change is to be able to build configure command lines that will work for both old and new versions of NetworkManager. Acked-By: Thomas Haller <thaller@redhat.com>
* build: fix compilation with GLib 2.32Jiří Klimeš2015-01-061-0/+1
| | | | for g_clear_pointer()