summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIPth/wip/ipv4-shared-address-rangeThomas Haller2016-03-213-0/+64
|
* dbus: don't do <deny send_interface="..." /> in dbus service fileLubomir Rintel2016-03-201-5/+12
| | | | | | | | | | | | | | | | | | | | | | | It does more than intended; apart from denying messages to that particular interface it also denies all messages non-qualified with an interface globally. This blocks messages completely unrelated to wpa_supplicant, such as NetworkManager communication with the VPN plugins. From the dbus-daemon manual: Be careful with send_interface/receive_interface, because the interface field in messages is optional. In particular, do NOT specify <deny send_interface="org.foo.Bar"/>! This will cause no-interface messages to be blocked for all services, which is almost certainly not what you intended. Always use rules of the form: <deny send_interface="org.foo.Bar" send_destination="org.foo.Service"/> We can just safely remove those rules, since we're sufficiently protected by the send_destination matches and method calls are disallowed by default anyway. https://bugzilla.gnome.org/show_bug.cgi?id=763880
* man: document IPv4 subnet for "shared" methodThomas Haller2016-03-201-0/+3
|
* device: optimize hashtable usage for shared_ipsThomas Haller2016-03-201-4/+1
| | | | | | No point ins storing "TRUE" as value in the @shared_ips hash table. That forces glib to allocate a separate storage for the value. Just use g_hash_table_add() instead.
* vpn-connection: do not leak the connection if there's no timeoutLubomir Rintel2016-03-181-1/+3
|
* vpn-connection: don't dispose the proxy before we get the disconnect responseLubomir Rintel2016-03-181-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return_method would be rejected by the dbus-daemon when the NM drops its match, resulting in an ugly message in the log: method call time=1458301860.187048 sender=:1.267 -> destination=:1.276 serial=5302 path=/org/freedesktop/NetworkManager/VPN/Plugin; interface=org.freedesktop.NetworkManager.VPN.Plugin; member=Disconnect method call time=1458301860.187054 sender=:1.267 -> destination=org.freedesktop.DBus serial=5303 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch string "type='signal',sender='org.freedesktop.DBus', interface='org.freedesktop.DBus', member='NameOwnerChanged', path='/org/freedesktop/DBus', arg0='org.freedesktop.NetworkManager.libreswan.Connection_10'" method return time=1458301860.187061 sender=org.freedesktop.DBus -> destination=:1.267 serial=1835 reply_serial=5303 ... method return time=1458301860.195351 sender=:1.276 -> destination=:1.267 serial=19 reply_serial=5302 error time=1458301860.195361 sender=org.freedesktop.DBus -> destination=:1.276 error_name=org.freedesktop.DBus.Error.AccessDenied reply_serial=19 string "Rejected send message, 7 matched rules; type="method_return", sender=":1.276" (uid=0 pid=26915 comm="/usr/libexec/nm-libreswan-service --bus-name org.f") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.267" (uid=0 pid=25724 comm="/usr/sbin/NetworkManager --no-daemon ")" Also, refcount the connection instance. While the proxy is alive, it invokes singal callbacks that get the object as a parameter.
* dhcp: fix GBytes leak in nm_dhcp_client_start_ip4()Francesco Giudici2016-03-181-1/+4
|
* dhcp: support _LOGx_ENABLED() macro in dhcp-clientThomas Haller2016-03-171-1/+8
| | | | | | | | The macro _LOGx_ENABLED() is defined with a default implementation that depends on _NMLOG_DOMAIN. Although that default does not check for LOGD_DHCP4 vs. LOGD_DHCP6, still provide it. Determining the correct domain might involve a larger performance impact that what we would safe.
* test-nm-client: fix the remaining counterLubomir Rintel2016-03-171-5/+6
| | | | | | | | | | | | | | | | We're expecting four callbacks: a client::devices change, client::active-connections change, client::activate callback, and a device::active-connection change. We only hook the second one in the callback to the first one, and only if client::active-connections is not set already. If it is (when running slowly in valgrind), we just decrement the counter. However, as the counter is one less than it should be, it would underflow and we wait forever* instead. For the value of forever=20s, given that's the timeout of the mockup service.
* rdisc: fix setting netns during consturction of NMRDiscThomas Haller2016-03-171-4/+0
| | | | | | | We obtain the netns from the platform instance that is passed in. It's wrong to set the current netns in nm_rdisc_init(). Fixes: 3ba944472853d5221ed83c369a77f80ee7305648
* lldp: merge branch 'th/lldp-bgo763499'Thomas Haller2016-03-178-410/+550
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=763499
| * lldp: refactor keeping tlv data and order entries in neighbor GVariantThomas Haller2016-03-171-107/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fields in the neighbor variant should have a defined order. Instead of sorting the hash table entries while constructing the variant in lldp_neighbor_to_variant(), refactor the management of the TLV attributes. As we only support known attributes, we can store them in an array at a known index instead of putting them in a hash table. An alternative would be to have explict fields for every known attribute. That would be even more efficient, but requires more work when adding new attributes.
| * lldp: ensure stable order of variants in LLDP neighbor listThomas Haller2016-03-171-14/+24
| |
| * lldp: drop process_lldp_neighbors()Thomas Haller2016-03-171-105/+9
| | | | | | | | | | | | | | We register the callback early on, so we get notified about every single neighbor as they show up. No need to iterate over them explicitly -- and probably, at that early state, there are no neighbors yet.
| * lldp: process one neighbor at a timeThomas Haller2016-03-172-40/+111
| | | | | | | | | | | | | | | | | | | | The systemd event tells which neighbor changed. Make use of this information and don't rebuild all the neighbors all the time. That means, we must also change our rate limiting. Instead of rate limiting the processing of all neighbors, we process neighbors right away but limit the notification that gobject property changed.
| * lldp: implement properties via NM_GOBJECT_PROPERTIES_DEFINE()Thomas Haller2016-03-171-14/+12
| |
| * lldp: improve loggingThomas Haller2016-03-171-5/+13
| |
| * lldp: let lldp_neighbor_new() also create invalid objectsThomas Haller2016-03-171-16/+17
| | | | | | | | | | | | | | | | | | | | When we receive an update for a certain neighbor, the update might be invalid and we want to reject it. However, we still must create an invalid object to compare whether the update causes a remove of a previously valid neighbor. Let lldp_neighbor_new() create an instance as long as the id fields are present.
| * lldp: cache the GVariant in LldpNeighborThomas Haller2016-03-171-11/+14
| |
| * lldp: factor out lldp_neighbor_to_variant()Thomas Haller2016-03-171-52/+58
| |
| * lldp: refactor processing all lldp-neighborsThomas Haller2016-03-171-45/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of replacing the whole hash with a new one (and all new by a new one, LldpNeighbor instances), update the existing hash. One point of this is that our process-all function requires less comparisons and avoids duplicate work right earlier. E.g. if a neighbor didn't change, we don't have to put it into a hash to compare later for equality. But more importantly, we preserve our LldpNeighbor instance instead of recreating them all the time. Later, the LldpNeighbor will cache the GVariant.
| * lldp: split out creation of LldpNeighbor instanceThomas Haller2016-03-171-163/+211
| |
| * lldp/trivial: rename internal type LLDPNeighbor to LldpNeighborThomas Haller2016-03-171-11/+11
| | | | | | | | | | Our convention is to use camel case for abbreviations that are longer then 2 charaters.
| * systemd: lldp: fix starting ttl timer for lldp neighborThomas Haller2016-03-171-7/+10
| | | | | | | | | | | | | | | | lldp_start_timer() was only called during sd_lldp_get_neighbors(). Ensure that the timer is (re-)started when a new neighbor appears. Otherwise, the timer is not started when relying on the events alone. https://github.com/systemd/systemd/pull/2826
| * logging: add new logging domain "SYSTEMD" for internal systemd loggingThomas Haller2016-03-173-2/+4
| |
| * shared: add nm_unauto() helper macroThomas Haller2016-03-171-0/+12
| |
| * shared: add nm_assert_not_reached()Thomas Haller2016-03-171-0/+2
| |
| * utils/core: add NM_UTILS_NS_PER_MSEC macroThomas Haller2016-03-171-0/+3
|/
* libnm: declare internal function as staticThomas Haller2016-03-171-2/+2
|
* merge: branch 'bg/8021x-domain-suffix-match-bgo341323'Beniamino Galvani2016-03-168-52/+220
|\ | | | | | | | | | | Add domain-suffix-match properties to NMSetting8021x. https://bugzilla.gnome.org/show_bug.cgi?id=341323
| * libnm-core: nm-setting-8021x: treat some empty properties as NULLBeniamino Galvani2016-03-161-4/+13
| | | | | | | | | | | | 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.
| * supplicant: honor the domain-suffix-match propertiesBeniamino Galvani2016-03-162-0/+10
| |
| * cli: add support for NMSetting8021x domain-suffix-match propertiesBeniamino Galvani2016-03-161-48/+70
| |
| * ifcfg-rh: add support for domain-suffix-match propertiesBeniamino Galvani2016-03-163-0/+26
| |
| * libnm-core: add domain-suffix-match properties to NMSetting8021xBeniamino Galvani2016-03-163-2/+103
|/ | | | | | | | | 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.
* NEWS: minor update referencing 1.0.10 releaseThomas Haller2016-03-161-1/+1
|
* ethernet: set the connection type when generating the connectionLubomir Rintel2016-03-161-0/+5
| | | | | | | | | | 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)
* libnm-util: reword code commentThomas Haller2016-03-151-2/+2
|
* libnm-util: add comment for return value of ↵Thomas Haller2016-03-151-4/+5
| | | | | | | | 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.
* platform: use gint32 for monotonic-timestamp secondsThomas Haller2016-03-153-9/+13
| | | | | | | @now is obtained via nm_utils_get_monotonic_timestamp_s(), which is gint32 (although it will never be negative). Use the correct type.
* platform: remove padding for IP address lifetimesThomas Haller2016-03-153-22/+13
| | | | | | | | | | | | | | | We used to pad the lifetime since the beginning (commit f121995fad93eda886b2a34a8d79a45a5688b917). 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
* device: fix handling of available connectionsBeniamino Galvani2016-03-151-6/+5
| | | | | | | | | | | 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: 8b2abe0e2c8f162544a2562fc18a7becbc55d233 https://bugzilla.redhat.com/show_bug.cgi?id=1316488
* platform: merge branch 'th/netns-aware-bgo763323'Thomas Haller2016-03-1542-217/+1072
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=763323
| * platform: add nmp_netns_bind_to_path() helper functionThomas Haller2016-03-153-0/+140
| | | | | | | | Based-on-patch-by: Stjepan Gros <stjepan.gros@gmail.com>
| * platform: support switching partial namespacesThomas Haller2016-03-153-42/+386
| | | | | | | | | | | | | | | | | | | | | | 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.
| * platform/tests: add test for nm_platform_link_set_netns()Thomas Haller2016-03-151-11/+62
| |
| * platform/tests: pass platform argument to nmtstp helper functionsThomas Haller2016-03-156-83/+90
| | | | | | | | | | | | 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).
| * platform: add nm_platform_link_set_netns() functionStjepan Gros2016-03-153-0/+58
| | | | | | | | | | [thaller@redhat.com: cherry-picked original patch and modified slightly]
| * platform/tests: refactor creation of test_netns_general()Thomas Haller2016-03-151-16/+35
| | | | | | | | Need to add more then one netns test.
| * utils: inject platform into nm_utils_complete_generic()Thomas Haller2016-03-1518-23/+45
| |