summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: optimize nm_manager_get_connection_iface()th/lr/conn-device-ifnameThomas Haller2016-02-171-0/+14
|
* device: don't overwrite get_connection_iface() by defaultThomas Haller2016-02-171-20/+7
| | | | | | Factories that overwrite this function are not supposed to chain up the parent implementation. Thus there is no reason to have a default implementation and it's clearer to inline it.
* manager: reused the factory looked up in nm_manager_get_connection_iface()Thomas Haller2016-02-171-7/+10
| | | | Only lookup the factory once and pass it down to find_parent_device_for_connection().
* device: remove interface name checks from all classesLubomir Rintel2016-02-176-44/+3
| | | | Generic check_connection_compatible() already does the check.
* device: move the interface name check from managerLubomir Rintel2016-02-172-12/+13
| | | | | | | | We not only want to check the device name when creating a virtual device, but also when determining if the connection can actually be activated there. Otherwise the device names will mix up if there's more connections that use virtual devices of the same type.
* manager: export nm_manager_get_connection_iface()Lubomir Rintel2016-02-172-12/+18
| | | | | We'll need the actual device name that should be used for a connection activated on a given device when checking the connection availability.
* device-factory: always use the factory to determine the connection's ↵Lubomir Rintel2016-02-172-22/+7
| | | | | | | interface name This makes things a bit simpler when determining if any connection is activatable on an existing device.
* device-factory/trivial: rename get_virtual_iface_name() to ↵Lubomir Rintel2016-02-178-42/+42
| | | | get_connection_iface()
* utils: fix NM_UTILS_ENUM2STR_DEFINE() which always returned the last elementThomas Haller2016-02-171-1/+1
| | | | Fixes: 174b25d98c3ae395f5b41fc2e7d5c222cb6369cf
* platform: add IN6_ADDR_GEN_MODE_RANDOM to ↵Thomas Haller2016-02-172-0/+2
| | | | | | nm_platform_link_inet6_addrgenmode2str() There is a new address generation mode.
* platform: use nm_platform_link_inet6_addrgenmode2str() in link-to-stringThomas Haller2016-02-171-17/+3
| | | | | | | Reuse the to-string function nm_platform_link_inet6_addrgenmode2str() to print the addrgenmode for nm_platform_link_to_string(). Also, now we support NM_IN6_ADDR_GEN_MODE_STABLE_PRIVACY.
* platform: stack-allocate temporary string in ↵Thomas Haller2016-02-171-8/+5
| | | | nm_platform_link_tun_get_properties_ifname()
* contrib/rpm: add README, improve usage output and rename --no-build option ↵Thomas Haller2016-02-172-6/+32
| | | | to --no-dist
* shared: move definition of "bool" to nm-macros-internal.hThomas Haller2016-02-162-47/+47
| | | | | | | | "nm-default.h" should only include all the relevant header files based on NETWORKMANAGER_COMPILATION. It should not contain definitions on it's own. Move the definition of "bool" to "nm-macros-internal.h".
* manager: fix typo in error messageBeniamino Galvani2016-02-161-1/+1
| | | | Fixes: 1762d58a8cf7fbd21b6940fb2a15c136952a9603
* platform: merge branch 'th/platform-recvmsgs-fixes-bgo761959'Thomas Haller2016-02-163-28/+24
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=761959
| * platform: during @abort_parsing goto stop in event_handler_recvmsgs()Thomas Haller2016-02-161-5/+2
| | | | | | | | | | Now, that we no longer overwrite @err, we can jump to stop: instead of out:.
| * platform: don't set @err during stop: in event_handler_recvmsgs()Thomas Haller2016-02-161-1/+1
| | | | | | | | | | | | If we break the loop normally, @err must be already set to zero. The only other way this can happen is when the credentials are invalid. Move setting @err to there.
| * platform: continue reading in event_handler_recvmsgs() when not handling eventsThomas Haller2016-02-161-1/+4
| | | | | | | | | | | | If @handle_events is FALSE, we want to drain the socket. In that case even when encountering an error error we don't want to abort, but instead continue reading the next message.
| * platform: fix error handling in event_handler_recvmsgs()Thomas Haller2016-02-161-2/+3
| | | | | | | | | | | | @abort_parsing is set TRUE at two places, which also explicitly set @err to something. We don't want to reset @err and got to the next @hdr. Instead error out first.
| * platform: downgrade logging message to TRACE level in event_handler_recvmsgs()Thomas Haller2016-02-161-2/+2
| | | | | | | | Doesn't seem important and might be triggered by other processes.
| * platform: don't return number of messages from event_handler_recvmsgs()Thomas Haller2016-02-161-6/+1
| | | | | | | | | | | | The value is not used by the callers. Also, with @handle_events set to false, it is not clear what the value really means because we skip over errors.
| * platform: simplify event_handler_recvmsgs() by using cleanup attributeThomas Haller2016-02-161-15/+5
| |
| * macros: add nm_auto_free macroThomas Haller2016-02-162-1/+11
|/ | | | | Similar to gs_free to cleanup pointers with free(). Note that g_free() and free() cannot be used interchangably.
* travis: update .travis.yml not to run tests when build failsThomas Haller2016-02-161-4/+4
| | | | | When building fails, we should not run the tests. They clutter the output.
* platform/tests: workaround test failure for kernel bugThomas Haller2016-02-161-3/+11
| | | | | | | | Unenslaving from a bridge can cause a spurious RTM_DELLINK signal. NMPlatform does raise those signals, but fixes the state of the cache afterwards. Workaround the test failure. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1285719
* merge: branch 'bg/dhcp-timeout-property-bgo761464'Beniamino Galvani2016-02-1610-55/+55
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=761464
| * libnm-core: fix ifcfg-rh documentation for dhcp-timeout propertyBeniamino Galvani2016-02-161-2/+2
| | | | | | | | Fixes: 3f0d595cc827d9e1117bc5c796aa11185ba8c5d7
| * libnm-core: make ipvx.dhcp-timeout signedBeniamino Galvani2016-02-163-9/+9
| | | | | | | | | | | | | | | | Change the dhcp-timeout property in NMSettingIPConfig to int type for consistency with the dad-timeout property. For dad-timeout -1 means "use default value", while for dhcp-timeout probably we will never use negative values, but it seems more correct to use the same type for the two properties.
| * libnm,core,cli: move dhcp-timeout property to generic NMSettingIPConfigBeniamino Galvani2016-02-1610-52/+52
|/ | | | | The property applies to both IPv4 and IPv6 and so it should not be in NMSettingIP4Config but in the base class.
* device: merge branch 'th/device-applied-connection-bgo760884'Thomas Haller2016-02-1611-28/+475
|\ | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=760884 https://bugzilla.gnome.org/show_bug.cgi?id=761714
| * introspection: document the meaning of active connectionsThomas Haller2016-02-161-0/+9
| |
| * device: fix signature for @flags argument of impl_device_reapply()Thomas Haller2016-02-163-6/+6
| | | | | | | | | | Thereby, also adjust the type for libnm's wrapper function -- as we already broke ABI.
| * libnm: add nm_device_get_applied_connection() functionThomas Haller2016-02-163-0/+194
| |
| * core: add NMDevice's GetAppliedConnection D-Bus callThomas Haller2016-02-162-9/+151
| | | | | | | | | | | | Expose applied connection in D-Bus API. https://bugzilla.gnome.org/show_bug.cgi?id=760884
| * all: add version-id argument to device's Reapply methodThomas Haller2016-02-166-6/+59
| | | | | | | | | | | | | | | | | | | | This breaks API and ABI for the functions related to Reapply, which got introduced in the current 1.1 development phase. The version-id is here to allow users to error out if the connection on the device was changed by a concurrent action. https://bugzilla.gnome.org/show_bug.cgi?id=761714
| * core: add version-id to NMActiveConnectionThomas Haller2016-02-163-5/+54
| | | | | | | | | | | | | | | | This field will be later used by NMDevice's Reapply and GetAppliedConnection methods. The usecase is to first fetch the currently applied connection, adjust it and reapply it. Using the version-id, a concurrent modification can be detected and Reapply can reject the invocation.
| * core/trivial: rename local function in "nm-settings-connection.c"Thomas Haller2016-02-161-7/+7
|/ | | | | Only D-Bus implementations should be named "^impl_.*", not a helper function.
* device: fix wrongly managing external devices by assuming on PLATFORM_INITThomas Haller2016-02-161-1/+1
| | | | | | | | | | Otherwise, a tun device from external openvpn service will be managed by NetworkManager. <debug> [1455615148.716529] [devices/nm-device.c:9082] _set_unmanaged_flags(): [0x55e6f5756070] (tun7): unmanaged: flags set to [!sleeping,!loopback,!platform-init,!user-config,!external-down=0x0/0xa19/managed, set-managed [platform-init=0x10], reason managed, transition-state) <info> (tun7): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2] Fixes: 87a3df2e572ed47b5f76f6d1cad63ce622296e21
* wifi: don't touch by default current powersave settingBeniamino Galvani2016-02-168-32/+139
| | | | | | | | | | | | | | | | | | | | | Some drivers (or things outside NM like 'powertop') may turn powersave on, so don't touch it unless explicitly configured by user. To achieve this, add new 'default' and 'ignore' options; the former can be used to fall back to a globally configured setting, while the latter tells NM not to touch the current setting. When 'default' is specified, a missing global default configuration is equivalent to 'ignore'. It is possible to enable Wi-Fi power saving for all connections by dropping a file in /etc/NetworkManager/conf.d with the following content: [connection] wifi.powersave=3 https://bugzilla.gnome.org/show_bug.cgi?id=760125
* dhcp/systemd: accept default gateway in classless static routes optionBeniamino Galvani2016-02-161-19/+39
| | | | | | | | RFC 3442 allows a default gateway to be specified in option 121 (Classless Static Routes) and override the Router option. Implement this in the internal DHCP client. https://bugzilla.gnome.org/show_bug.cgi?id=761268
* shared: add nm_streq() and nm_streq0() macroThomas Haller2016-02-151-0/+5
| | | | | | | | | | | | | Using strcmp() to test for string equality is a well known pattern. However the inverse logic still is still hard to grasp especially in more complex expressions. nm_streq() should is an alternative to use strcmp(). And there is a counterpart nm_streq0() which is based on g_strcmp0(). Kernel and systemd have also similar streq() macros. https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00047.html
* core: merge branch 'lr/default-unmanaged-bgo746566'Thomas Haller2016-02-158-371/+534
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=746566
| * device: remove default-unmanaged and refactor unmanaged flagsThomas Haller2016-02-158-346/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of NM_UNMANAGED_DEFAULT and refine the interaction between unmanaged flags, device state and managed property. Previously, the NM_UNMANAGED_DEFAULT was special in that a device was still considered managed if it had solely the NM_UNMANAGED_DEFAULT flag set and its state was managed. Thus, whether the device (state) was managed, depended on the device state too. Now, a device is considered managed (or unmanaged) based on the unmanaged flags and realization state alone. At the same time, the device state directly corresponds to the managed property of the device. Of course, while changing the unmanaged flags, that invariant is shortly violated until the state transistion is complete. Introduce more unmanaged flags whereas some of them are non-authorative. For example, the EXTERNAL_DOWN flag has only effect as long as the user didn't explicitly manage the device (NM_UNMANAGED_USER_EXPLICIT). In other words, certain flags can render other flags ineffective. Whether the device is considered managed depends on the flags but also at the explicitly unset flags. In a way, this is similar to previous where NM_UNMANAGED_DEFAULT was ignored (if no other flags were present). Also, previously a device that was NM_UNMANAGED_DEFAULT and in disconnected state would transition back to unmanaged. No longer do that. Once a device is managed, it stays managed as long as the flags indicate it should be managed. However, the user can also modify the unmanaged flags via the D-Bus API. Also get rid or nm_device_finish_init(). That was previously called by NMManager after add_device(). As we now realize devices (possibly multiple times) this should be handled during realization. https://bugzilla.gnome.org/show_bug.cgi?id=746566
| * device/trivial: rename nm_device_set_unmanaged_flags()Thomas Haller2016-02-155-61/+61
| |
| * device: for available connections check whether they are available for ↵Thomas Haller2016-02-151-2/+2
|/ | | | | | user-request But not with ignoring-carrier and ignoring-ap.
* device: always do a unrealized delete check when rechecking available ↵Lubomir Rintel2016-02-151-3/+2
| | | | | | | | connections It could be that what changed is the unrealize flag, not the number available connections. That could happen when a last connection for a software device is removed.
* device: check avaliable connections are really availableLubomir Rintel2016-02-151-4/+9
| | | | | | | | The nm_device_check_connection_available() call seem to have been accidentally removed from nm_device_recheck_available_connections() resulting in all connections always being added. Fixes 02ec76df5aaa3a3ad197cb1d53c0388029775b07
* core: merge branch 'th/kill_dnsmasq_bgo762008'Thomas Haller2016-02-152-27/+32
|\ | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=728342 https://bugzilla.gnome.org/show_bug.cgi?id=762008
| * utils: use stack allocated buffer for path in nm_utils_get_start_time_for_pid()Thomas Haller2016-02-151-2/+2
| |