Commit Graph

15047 Commits

Author SHA1 Message Date
Lubomir Rintel
f457f4ef83 man: drop nm-system-settings.conf.5
It's long deprecated and the last roff manual page.

Instead, NetworkManager.conf(5) documents the file. Let's just link that
one.
2016-04-05 14:37:50 +02:00
Lubomir Rintel
8a9350f3b0 man: convert nm-online(1) manual to docbook refentry 2016-04-05 14:37:50 +02:00
Lubomir Rintel
5216307b5a man: convert nmtui(1) manual to docbook refentry 2016-04-05 14:37:50 +02:00
Lubomir Rintel
b19e4d37b6 man: convert nmcli(1) manual to docbook refentry 2016-04-05 14:37:50 +02:00
Lubomir Rintel
05e467ad53 docs: load the dbus documentation and manuals from original location
There's nothing to expand there.
2016-04-05 14:37:50 +02:00
Lubomir Rintel
322b6e8a32 merge: branch 'lr/translations'
Translation updates & Zanata configuration.
2016-04-05 14:37:00 +02:00
Lubomir Rintel
c5f40c701e po: add Zanata configuration 2016-04-05 14:35:53 +02:00
Lubomir Rintel
23b39eb2da po: pull translations from Red Hat 2016-04-05 14:35:53 +02:00
Lubomir Rintel
89d035d061 po: pull translations from Fedora Zanata 2016-04-05 14:35:52 +02:00
Lubomir Rintel
41de730d23 po: update-po 2016-04-05 14:35:52 +02:00
Lubomir Rintel
6701cb8f23 po: remove bad character from Italian translation 2016-04-05 14:35:51 +02:00
Beniamino Galvani
5e78322088 core: fix message format for failed creation of secret key 2016-04-05 14:32:00 +02:00
Thomas Haller
e4c1699a83 build: reorder files for building platform
Build the sources in order so that files that depend on other
files are build after the files they depend on.
2016-04-05 13:38:32 +02:00
Thomas Haller
30302d7157 auth: downgrade g_assert() to nm_assert()
We know that this isn't going to fail. No need to check every time.
2016-04-05 10:39:20 +02:00
Lubomir Rintel
9498ea507e manager: ensure IP config of device is cleared before removal
If the manager removes the device, the IP config objects must
be cleared. The reason is that NMPolicy registers to the IP config
changed signal and passes these object on to NMDnsManager.

If the INTERNAL_DEVICE_REMOVED signal is emited with IP configuration
object pending, those objects will be leaked.

This partly redoes commit f72816bf10,
which was reverted.

Co-Authored-By: Thomas Haller <thaller@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=764483
2016-04-04 23:10:20 +02:00
Thomas Haller
c5d827057e device: ensure @error always set by nm_device_factory_create_device()
https://bugzilla.gnome.org/show_bug.cgi?id=764606
2016-04-04 21:27:05 +02:00
Thomas Haller
fe6940b692 manager: refactor error variable in platform_link_added()
Free the error via gs_free_error and create separate instances.
2016-04-04 21:26:51 +02:00
Thomas Haller
1078935ccb policy: merge branch 'th/policy-cleanup-v2' 2016-04-04 16:48:40 +02:00
Thomas Haller
f7729751da core: use defines for signal names in NMDnsManager and NMFirewallManager 2016-04-04 16:48:10 +02:00
Thomas Haller
1ddc2c59b8 policy: pass private pointer as signal user-data for settings handlers 2016-04-04 16:48:10 +02:00
Thomas Haller
9e886147c9 policy: pass private pointer as signal user-data for manager handlers 2016-04-04 16:48:10 +02:00
Thomas Haller
9a9250e53a policy: pass private pointer as signal user-data for device handlers
We want to unregister the signals at cleanup time via
g_signal_handlers_disconnect_by_data(). This saves us from
storing the signal handler id or by naming the function
explicitly via g_signal_handlers_disconnect_by_func().

However, the registered user-data @self is a public pointer. That
is ugly, because potentially another component could register a
signal with passing the public @self pointer as user-data.
Although that doesn't currently happen, it is more correct to register
with a private pointer to avoid this case altogether.
2016-04-04 16:46:48 +02:00
Thomas Haller
b298d3e279 policy: removed unused signal subscription to "NMManager::state-changed" 2016-04-04 16:45:48 +02:00
Thomas Haller
1dd0693055 policy: refactor tracking registered signals to NMManager's instance 2016-04-04 16:45:48 +02:00
Thomas Haller
ccda474a02 manager: remove unused signal "user-permissions-changed" 2016-04-04 16:45:48 +02:00
Thomas Haller
9cc00d9e26 manager: use defines for signal names 2016-04-04 16:45:48 +02:00
Thomas Haller
aabb63e8b7 policy: refactor tracking registered signals to NMSettings's instance 2016-04-04 15:47:22 +02:00
Thomas Haller
6a08085d27 policy: embed pointer to private data into NMPolicy
Instead of a G_TYPE_INSTANCE_GET_PRIVATE() call every time,
fetching the private data becomes a pointer dereference.

As only one instance of NMPolicy exists, this costs us only
one additional pointer of memory.
2016-04-04 15:47:22 +02:00
Thomas Haller
7e3d090acb policy: refactor tracking of registered devices
No need to track the signal id of the device. We unsubscribe
all devices together, hence we can just use
g_signal_handlers_disconnect_by_data().
2016-04-04 15:47:21 +02:00
Thomas Haller
47c6b6db07 device: remove ignored dummy variable 2016-04-04 15:47:21 +02:00
Thomas Haller
e42fe89242 device/trivial: fix indention with tabs vs. spaces and align "nm-device.h" 2016-04-04 15:47:21 +02:00
Thomas Haller
2716c7f115 device: merge branch 'th/unmanaged-external-down-bgo763236'
https://bugzilla.gnome.org/show_bug.cgi?id=761389
https://bugzilla.gnome.org/show_bug.cgi?id=763236
2016-04-04 15:35:10 +02:00
Beniamino Galvani
35059ed48e device: allow NM-owned device to be assumed
Software devices created by NM should be kept up when quitting so that
they can be assumed upon restart. But now we consider devices created
by NM (those with the @is_nm_owned flag) not capable of assuming
connections and therefore we tear them down and deconfigure when
quitting.

Change this and ignore @is_nm_owned when deciding if a device can be
re-assumed.
2016-04-04 15:33:17 +02:00
Thomas Haller
e1edcda317 device: consider external devices as unmanaged until they have an IP address 2016-04-04 15:33:16 +02:00
Thomas Haller
207c0f5f81 platform: add nm_platform_link_can_assume() 2016-04-04 15:33:16 +02:00
Lubomir Rintel
a6fb37bae2 Revert "manager: don't remove the device before policy learns of ip config change"
This doesn't unexport the connection on disconnect (as opposed to device
removal).

This reverts commit f72816bf10.
2016-04-04 12:52:56 +02:00
Lubomir Rintel
f72816bf10 manager: don't remove the device before policy learns of ip config change
First let the device know it's being removed soon so that it has a
chance to clean up the IP configuration early.

If the manager removes the device fist, the policy never learns of
config removal and doesn't unhook it from the DNS manager resulting in a
IPConfig leak and possible wrong DNS configuration in effect.

Also adjust the route manager to skip over devices without IP
configuration when determining the best connection; it is perhaps
just due to being removed.

https://bugzilla.gnome.org/show_bug.cgi?id=764483
2016-04-04 12:40:40 +02:00
Thomas Haller
c06289459f rdisc: reject invalid prefix lengths from router advertisements
Later in NMDevice's rdisc_config_changed(), we already reject
routes with plen==0. Just do it earlier.

We would however not reject bogus routes with a prefix larger then 128.
That would later lead to an error when trying to add such a route to the
kernel.
2016-04-04 12:21:35 +02:00
Thomas Haller
c84d659b9b rdisc: refactor receive_ra() to set data in initializer
Don't use memset() and set the fields afterwards. Instead use
designated initializers.

Also, move the temporary variables closer to where they are used.
2016-04-04 11:48:55 +02:00
Beniamino Galvani
d6d42e0825 libnm-core: add 'use-vc' DNS option
The option forces the use of TCP for DNS resolutions.
2016-04-03 23:08:38 +02:00
Thomas Haller
2b394d0092 dns-manager: use NM_IN_SET() in condition 2016-04-03 14:54:37 +02:00
Thomas Haller
fd496fd887 dns-manager: fix compute_hash() to skip over duplicate other configs
Fixes: f76aa4f77c
2016-04-03 14:54:34 +02:00
Thomas Haller
a6af426271 manager: fix memleak in error-path of _internal_enable() 2016-04-01 18:55:15 +02:00
Thomas Haller
7871a8fb06 manager: refactor handling GObject properties
Use NM_GOBJECT_PROPERTIES_DEFINE() and _notify() function.
2016-04-01 17:47:45 +02:00
Thomas Haller
4be28b3916 contrib/rpm: fix logic in build.sh about specifying source
When the user neither specifies SOURCE or SOURCE_FROM_GIT,
we first want to detect a tarball in the current directory,
and as second fallback to SOURCE_FROM_GIT=1.

If either SOURCE or SOURCE_FROM_GIT is set, we want to do
that and not detect anything.

The logic was wrong.
2016-04-01 15:54:06 +02:00
Thomas Haller
5617cd4e61 merge: merge branch 'systemd' into master
After merging https://github.com/systemd/systemd/pull/2898,
use the LLDP defines now from public systemd API.
2016-04-01 15:15:43 +02:00
Lubomir Rintel
ec542df4df manager: don't the already activated devices shouldn't be considered added
The NMSettings shouldn't generate a new default wired connection for
devices that are being deactivated.
2016-04-01 14:35:38 +02:00
Thomas Haller
2fcd9f8bc7 systemd: update code from upstream
This is a direct dump from systemd git on 2016-03-31, git commit
1db30aeab10ca716aae877b298289fe1765f14fb.

======

SYSTEMD_DIR=../systemd
COMMIT=1db30aeab10ca716aae877b298289fe1765f14fb

(
  cd "$SYSTEMD_DIR"
  git checkout "$COMMIT"
  git reset --hard
  git clean -fdx
)

git ls-files :/src/systemd/src/ | xargs -d '\n' rm -f

nm_copy_sd() {
    mkdir -p "./src/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
}

nm_copy_sd "src/basic/alloc-util.c"
nm_copy_sd "src/basic/alloc-util.h"
nm_copy_sd "src/basic/async.h"
nm_copy_sd "src/basic/escape.c"
nm_copy_sd "src/basic/escape.h"
nm_copy_sd "src/basic/ether-addr-util.c"
nm_copy_sd "src/basic/ether-addr-util.h"
nm_copy_sd "src/basic/fileio.c"
nm_copy_sd "src/basic/fileio.h"
nm_copy_sd "src/basic/fd-util.c"
nm_copy_sd "src/basic/fd-util.h"
nm_copy_sd "src/basic/fs-util.c"
nm_copy_sd "src/basic/fs-util.h"
nm_copy_sd "src/basic/hash-funcs.c"
nm_copy_sd "src/basic/hash-funcs.h"
nm_copy_sd "src/basic/hashmap.c"
nm_copy_sd "src/basic/hashmap.h"
nm_copy_sd "src/basic/hexdecoct.c"
nm_copy_sd "src/basic/hexdecoct.h"
nm_copy_sd "src/basic/hostname-util.c"
nm_copy_sd "src/basic/hostname-util.h"
nm_copy_sd "src/basic/in-addr-util.c"
nm_copy_sd "src/basic/in-addr-util.h"
nm_copy_sd "src/basic/io-util.c"
nm_copy_sd "src/basic/io-util.h"
nm_copy_sd "src/basic/list.h"
nm_copy_sd "src/basic/log.h"
nm_copy_sd "src/basic/macro.h"
nm_copy_sd "src/basic/mempool.h"
nm_copy_sd "src/basic/mempool.c"
nm_copy_sd "src/basic/parse-util.c"
nm_copy_sd "src/basic/parse-util.h"
nm_copy_sd "src/basic/path-util.c"
nm_copy_sd "src/basic/path-util.h"
nm_copy_sd "src/basic/prioq.h"
nm_copy_sd "src/basic/prioq.c"
nm_copy_sd "src/basic/random-util.c"
nm_copy_sd "src/basic/random-util.h"
nm_copy_sd "src/basic/refcnt.h"
nm_copy_sd "src/basic/set.h"
nm_copy_sd "src/basic/siphash24.c"
nm_copy_sd "src/basic/siphash24.h"
nm_copy_sd "src/basic/socket-util.c"
nm_copy_sd "src/basic/socket-util.h"
nm_copy_sd "src/basic/sparse-endian.h"
nm_copy_sd "src/basic/stdio-util.h"
nm_copy_sd "src/basic/string-table.c"
nm_copy_sd "src/basic/string-table.h"
nm_copy_sd "src/basic/string-util.c"
nm_copy_sd "src/basic/string-util.h"
nm_copy_sd "src/basic/strv.c"
nm_copy_sd "src/basic/strv.h"
nm_copy_sd "src/basic/time-util.c"
nm_copy_sd "src/basic/time-util.h"
nm_copy_sd "src/basic/umask-util.h"
nm_copy_sd "src/basic/unaligned.h"
nm_copy_sd "src/basic/utf8.c"
nm_copy_sd "src/basic/utf8.h"
nm_copy_sd "src/basic/util.c"
nm_copy_sd "src/basic/util.h"
nm_copy_sd "src/libsystemd-network/arp-util.c"
nm_copy_sd "src/libsystemd-network/arp-util.h"
nm_copy_sd "src/libsystemd-network/dhcp6-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp6-lease-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp6-network.c"
nm_copy_sd "src/libsystemd-network/dhcp6-option.c"
nm_copy_sd "src/libsystemd-network/dhcp6-protocol.h"
nm_copy_sd "src/libsystemd-network/dhcp-identifier.c"
nm_copy_sd "src/libsystemd-network/dhcp-identifier.h"
nm_copy_sd "src/libsystemd-network/dhcp-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp-lease-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp-network.c"
nm_copy_sd "src/libsystemd-network/dhcp-option.c"
nm_copy_sd "src/libsystemd-network/dhcp-packet.c"
nm_copy_sd "src/libsystemd-network/dhcp-protocol.h"
nm_copy_sd "src/libsystemd-network/lldp.h"
nm_copy_sd "src/libsystemd-network/lldp-internal.h"
nm_copy_sd "src/libsystemd-network/lldp-neighbor.c"
nm_copy_sd "src/libsystemd-network/lldp-neighbor.h"
nm_copy_sd "src/libsystemd-network/lldp-network.c"
nm_copy_sd "src/libsystemd-network/lldp-network.h"
nm_copy_sd "src/libsystemd-network/network-internal.c"
nm_copy_sd "src/libsystemd-network/network-internal.h"
nm_copy_sd "src/libsystemd-network/sd-dhcp6-client.c"
nm_copy_sd "src/libsystemd-network/sd-dhcp6-lease.c"
nm_copy_sd "src/libsystemd-network/sd-dhcp-client.c"
nm_copy_sd "src/libsystemd-network/sd-dhcp-lease.c"
nm_copy_sd "src/libsystemd-network/sd-ipv4ll.c"
nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c"
nm_copy_sd "src/libsystemd-network/sd-lldp.c"
nm_copy_sd "src/libsystemd/sd-event/sd-event.c"
nm_copy_sd "src/libsystemd/sd-id128/sd-id128.c"
nm_copy_sd "src/shared/dns-domain.c"
nm_copy_sd "src/shared/dns-domain.h"
nm_copy_sd "src/systemd/_sd-common.h"
nm_copy_sd "src/systemd/sd-dhcp6-client.h"
nm_copy_sd "src/systemd/sd-dhcp6-lease.h"
nm_copy_sd "src/systemd/sd-dhcp-client.h"
nm_copy_sd "src/systemd/sd-dhcp-lease.h"
nm_copy_sd "src/systemd/sd-event.h"
nm_copy_sd "src/systemd/sd-ndisc.h"
nm_copy_sd "src/systemd/sd-id128.h"
nm_copy_sd "src/systemd/sd-ipv4acd.h"
nm_copy_sd "src/systemd/sd-ipv4ll.h"
nm_copy_sd "src/systemd/sd-lldp.h"
2016-04-01 13:31:10 +02:00
Lubomir Rintel
1ab89ecf85 man/nmcli-examples: specify a language for the listing 2016-04-01 12:29:42 +02:00
Lubomir Rintel
159c95cbe2 man/nmcli-examples: no extra breaks around listings
Looks bad in HTML.
2016-04-01 12:29:20 +02:00