Commit Graph

21088 Commits

Author SHA1 Message Date
Thomas Haller
c75c51d505 logging: add new logging domain "SYSTEMD" for internal systemd logging 2016-03-17 15:00:48 +01:00
Thomas Haller
0330a55851 shared: add nm_unauto() helper macro 2016-03-17 15:00:48 +01:00
Thomas Haller
a50d28d4dd shared: add nm_assert_not_reached() 2016-03-17 15:00:48 +01:00
Thomas Haller
ab2456493d utils/core: add NM_UTILS_NS_PER_MSEC macro 2016-03-17 15:00:48 +01:00
Thomas Haller
2778d257cc libnm: declare internal function as static 2016-03-17 11:32:53 +01:00
Beniamino Galvani
e2040e5ebe merge: branch 'bg/8021x-domain-suffix-match-bgo341323'
Add domain-suffix-match properties to NMSetting8021x.

https://bugzilla.gnome.org/show_bug.cgi?id=341323
2016-03-16 17:34:52 +01:00
Beniamino Galvani
46f8045c9e libnm-core: nm-setting-8021x: treat some empty properties as NULL
For some properties as *subject-match and *domain-suffix-match an
empty string means that we don't want to do any filtering and should
be stored as NULL.
2016-03-16 17:32:17 +01:00
Beniamino Galvani
2f45aaa55f supplicant: honor the domain-suffix-match properties 2016-03-16 17:32:17 +01:00
Beniamino Galvani
945c459f20 cli: add support for NMSetting8021x domain-suffix-match properties 2016-03-16 17:32:17 +01:00
Beniamino Galvani
a4b4e0bc5b ifcfg-rh: add support for domain-suffix-match properties 2016-03-16 17:32:17 +01:00
Beniamino Galvani
64b76ba906 libnm-core: add domain-suffix-match properties to NMSetting8021x
The new domain-suffix-match and phase2-domain-suffix-match properties
can be used to match against a given server domain suffix in the
dNSName elements or in the SubjectName CN of the server certificate.

Also, add a comment to the old subject-match properties documentation
to suggest that they are deprecated and should not be used anymore.
2016-03-16 17:32:17 +01:00
Thomas Haller
c1383371cc NEWS: minor update referencing 1.0.10 release 2016-03-16 12:29:46 +01:00
Lubomir Rintel
8f82fa83ce ethernet: set the connection type when generating the connection
Otherwise the connection wouldn't verify:

  <error> [1458066126.2270] device (eth10): Generated connection does not verify:
    connection.type: property type should be set to '802-3-ethernet'
  <debug> [1458066126.2271] manager: (eth10): can't assume; no connection

(cherry picked from commit 4b71939e9ac3df93bfe72af0eac42b4ebaf94e15)
2016-03-16 11:38:00 +01:00
Thomas Haller
ecd42cd915 libnm-util: reword code comment 2016-03-15 18:53:24 +01:00
Thomas Haller
35586da48e libnm-util: add comment for return value of nm_connection_replace_settings_from_connection()
nm_connection_replace_settings_from_connection() can safely be used
to copy an invalid connection. The return value only says, whether
the connection is valid after the fact.
2016-03-15 18:51:49 +01:00
Thomas Haller
c7aea6b620 platform: use gint32 for monotonic-timestamp seconds
@now is obtained via nm_utils_get_monotonic_timestamp_s(),
which is gint32 (although it will never be negative).

Use the correct type.
2016-03-15 18:28:43 +01:00
Thomas Haller
6cb7322465 platform: remove padding for IP address lifetimes
We used to pad the lifetime since the beginning (commit
f121995fad).

However, there is not race involved, since our platform cache
is in sync with the messages from kernel (which didn't used to
be the case).

Also, when receiving a RA with a zero preferred time, we must
not extend the address lifetime by 5 seconds, but instead deprecate
the address immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=763513
2016-03-15 18:28:43 +01:00
Beniamino Galvani
ca5da5d80f device: fix handling of available connections
The prune list is for elements that must be deleted from the list of
available connections. So, when processing all the existing
connections an element must be deleted from the prune list iff it's
available.

Fixes: 8b2abe0e2c

https://bugzilla.redhat.com/show_bug.cgi?id=1316488
2016-03-15 17:38:58 +01:00
Thomas Haller
7037e0b374 platform: merge branch 'th/netns-aware-bgo763323'
https://bugzilla.gnome.org/show_bug.cgi?id=763323
2016-03-15 12:56:59 +01:00
Thomas Haller
46f5c07643 platform: add nmp_netns_bind_to_path() helper function
Based-on-patch-by: Stjepan Gros <stjepan.gros@gmail.com>
2016-03-15 12:56:59 +01:00
Thomas Haller
3428d8607d platform: support switching partial namespaces
Previously, the push/pop API to switch between namespaces would always
switch both the net and mount namespace together.

There are situations, where we want to only switch one namespace.
For example, the function nmp_netns_bind_to_path() introduced next
only wants to switch the net namespace to get /proc/self/ns/net,
but must not switch the mount namespace as it bind-mounds in the
namespace of the caller.
2016-03-15 12:56:58 +01:00
Thomas Haller
a0cce2b195 platform/tests: add test for nm_platform_link_set_netns() 2016-03-15 12:56:58 +01:00
Thomas Haller
ad345cdf7d platform/tests: pass platform argument to nmtstp helper functions
Make the test helper independent from the platform singleton instance.
That way, we can also use them for other platform instances (e.g. in a
different namespace).
2016-03-15 12:56:58 +01:00
Stjepan Gros
9995699116 platform: add nm_platform_link_set_netns() function
[thaller@redhat.com: cherry-picked original patch and modified
  slightly]
2016-03-15 12:56:58 +01:00
Thomas Haller
30fe52c766 platform/tests: refactor creation of test_netns_general()
Need to add more then one netns test.
2016-03-15 12:56:58 +01:00
Thomas Haller
2eab5ed347 utils: inject platform into nm_utils_complete_generic() 2016-03-15 12:56:58 +01:00
Thomas Haller
56121fec83 route-manager: make NMRouteManager namespace aware 2016-03-15 12:56:58 +01:00
Thomas Haller
80136bed74 default-route-manager: make NMDefaultRouteManager namespace aware 2016-03-15 12:56:58 +01:00
Thomas Haller
fc53700fce default-route-manager: use explict platform instance instead of NM_PLATFORM_GET singleton 2016-03-15 12:56:58 +01:00
Thomas Haller
3ba9444728 rdisc: make NMRDisc namespace aware 2016-03-15 12:56:58 +01:00
Thomas Haller
a0c8f9c345 rdisc/trivial: adjust indention in nm_rdisc_class_init() 2016-03-15 12:56:58 +01:00
Thomas Haller
c924aae14a platform: add defines for "/proc/self/ns/" paths 2016-03-15 12:56:57 +01:00
Thomas Haller
7df7619e22 platform: properly change netns in do_change_link() 2016-03-15 12:56:57 +01:00
Thomas Haller
b5c8d496c2 nmtst: add NMTST_DEBUG option "D" 2016-03-15 12:56:57 +01:00
Lubomir Rintel
d6c399b1dd systemd: fall back to CLOCK_MONOTONIC
https://github.com/systemd/systemd/pull/2843
2016-03-15 12:53:19 +01:00
Lubomir Rintel
93bc9c0294 ocd: style fix 2016-03-15 09:18:16 +01:00
Lubomir Rintel
0adac47922 ifupdown: style fixes 2016-03-15 09:18:01 +01:00
Lubomir Rintel
c4fed9bd36 ifnet: fix error handling
Oh my.
2016-03-15 09:00:03 +01:00
Lubomir Rintel
12063468a3 ifnet: fix a possible NULL dereference
CID 75367 (#1 of 1): Dereference null return value (NULL_RETURNS)
30. dereference: Incrementing a pointer which might be null: pos.
2016-03-15 09:00:03 +01:00
Lubomir Rintel
4e0968182c nmp-netns: fix error handling
GError is not used, the error branch would always result in NULL dereference.

Also, check for the result being zero for clarity -- it's the only allowed
success indication.

CID 75365 (#3 of 3): Explicit null dereferenced (FORWARD_NULL)
12. var_deref_op: Dereferencing null pointer error.
2016-03-15 09:00:03 +01:00
Beniamino Galvani
ff97494e78 cli: fix memory leak in connection listing 2016-03-14 22:18:17 +01:00
Lubomir Rintel
e4aaa48b82 ifupdown: fix up a bad rebase
Fixes: 0cb45af977
2016-03-14 16:39:43 +01:00
Lubomir Rintel
ad8251e3a4 nm-object: delay object property completion until the objects are initialized
We don't want to update the properties until the objects referred are complete.
Otherwise the clients get confused. Very confused:

https://bugzilla.redhat.com/show_bug.cgi?id=1313866

We already delay the notification signals. Let's replace that with delaying the
actual ObjectCreatedData processing instead.
2016-03-14 16:32:44 +01:00
Lubomir Rintel
1b826d9dd9 ifupdown: set wireless mode 2016-03-14 16:32:15 +01:00
Lubomir Rintel
b6bbf3df1e ifupdown: ssid is now GBytes for quite some time
Fixes: c43f88907b
2016-03-14 16:32:15 +01:00
Lubomir Rintel
5b14492b0b ifupdown: wireless-essid is good too 2016-03-14 16:32:15 +01:00
Lubomir Rintel
0cb45af977 ifupdown: don't remove the object in its constructor
This is wrong an all the complexity of a property and associated bookkeeping is
completely unnecessary.
2016-03-14 16:32:15 +01:00
Lubomir Rintel
a5c204a69a ifupdown: drop a bogus warning
The key might be a wireless setting that has already been processed, not a
wireless-security setting.
2016-03-14 16:32:15 +01:00
Lubomir Rintel
6da97a8c48 contrib/rpm: with-udev-dir now has a sensible default 2016-03-14 16:32:15 +01:00
Lubomir Rintel
fa16fb1808 build: install udev files under prefix
It should really be in /usr/lib, not /lib. Not a real issue, since the two are
usually links, but the latter is supposably for compatibility only. This also
installs into correct place when configured with a different --prefix.
2016-03-14 16:32:14 +01:00