summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* logging: always print the timestamp and align locationth/logging-format-bgo762009Thomas Haller2016-02-161-4/+4
| | | | | | | | | | | | Change the logging format. For syslog, we will now always print the timestamp (also for <info> and <warn> messages). Also, when printing the file location, we will always align it. For journal logging, also enable the timestamp. While the timestamp is already captured separately by journal, most of the time a user will look at the syslog like output from journal, so we want the timestamps there too.
* logging: add LOG_FORMAT_FLAG_ALIGN_LOCATION flagThomas Haller2016-02-161-6/+36
|
* logging: add logging-format-flagsThomas Haller2016-02-161-29/+82
| | | | No functional change.
* core: use nm_utils_parse_debug_string() instead of g_parse_debug_string()Thomas Haller2016-02-161-9/+3
|
* utils: add nm_utils_parse_debug_string() to replace g_parse_debug_string()Thomas Haller2016-02-162-0/+65
| | | | | g_parse_debug_string() interprets the string "help" special and accepts an "all" tag to invert the result. We don't want that.
* dispatcher: minor cleanup ignoring dispatcher scripts by filenameThomas Haller2016-02-161-3/+9
|
* 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
| |
| * dnsmasq: refactor creating dnsmasq command line args to pass listen_address ↵Thomas Haller2016-02-151-10/+8
| | | | | | | | argument
| * dnsmasq: kill running process from pidfile synchronouslyThomas Haller2016-02-151-15/+22
|/ | | | | | | | | | | | | | | | | This should avoid a race when stopping dnsmasq. This is still a hack, because we don't want to ever wait for a process to terminate. A better solution would be to have nm-dnsmasq-manager managing the global state. Not only the dnsmasq instance of on NMDevice. Instead it should keep track of all the child processes it starts and it wants to start. This way, starting a new process should be delayed until any (child or non-child) instances are gone. That however would be a bigger change. https://bugzilla.gnome.org/show_bug.cgi?id=728342 https://bugzilla.gnome.org/show_bug.cgi?id=762008
* platform: fix detection of link-type for netlink eventThomas Haller2016-02-151-1/+1
| | | | | | | | Often a netlink event doesn't contain enough information to determine the link type. Then we consult sysctl or ethtool. However, if we already have the same object cached, we want to reused the (once detected) link-type. There was a bug in lookup of the cached object.
* platform: change format to print link-type in nm_platform_link_to_string()Thomas Haller2016-02-151-3/+2
|
* nmtst: drop deprecated test helper macro ASSERT()Thomas Haller2016-02-151-8/+0
| | | | It's no longer used.
* ifcfg-rh/tests: refactor test using helper functions and drop ASSERT() macroThomas Haller2016-02-152-4717/+1123
|
* nmtst: add nmtst_assert_connection_verify() and don't normalize connection ↵Thomas Haller2016-02-153-34/+56
| | | | | | | in assert It is ugly that nmtst_assert_connection_verifies_after_normalization() would normalize the argument and modify it. An assertion should not have side-effects.
* libnm/tests: convert test cases to use g_assert() instead of ASSERT() ↵Thomas Haller2016-02-144-227/+112
| | | | (test-setting-8021x.c)
* libnm/tests: convert test cases to use g_assert() instead of ASSERT() ↵Thomas Haller2016-02-141-98/+35
| | | | (test-crypto.c)