Commit Graph

21088 Commits

Author SHA1 Message Date
Thomas Haller
8daa61dae3 platform: fix return value for nm_platform_sysctl_set()
When comparing an unsigned and a signed integer, the signed integer
is promoted to unsigned, resulting in a very large number.

See the checks "nwrote < len - 1", where nwrote might be -1
to indicate failure. The condition would not be TRUE due to
promoting -1 to the max int value.

Hence, sysctl_set() was rather wrong.
2017-10-23 17:52:10 +02:00
Thomas Haller
5f882e8e8f libnm: reject colon in nm_utils_is_valid_iface_name()
Since kernel commit a4176a9391868bfa87705bcd2e3b49e9b9dd2996 (net:
reject creation of netdev names with colons), kernel rejects any
colons in the interface name.

Since kernel could get away with tightening up the check, we can
too.

The user anyway can not choose arbitrary interface names, like
"all", "default", "bonding_masters" are all going to fail one
way or another.
2017-10-23 14:59:52 +02:00
Beniamino Galvani
b3b9b2bf38 build: disable lcov version check
Ideally we should switch to the standard macro AX_CODE_COVERAGE for
code coverage, but infortunately it's not supported on older distros
(e.g. on Travis).

Keep using the current macro, but remove the lcov version check as
it's not clear why it's needed in the first place (see [1]). The
latest version of lcov is now 1.13.

[1] http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=dedd290bdb647704d74c13992bd04275d9cb648e
2017-10-20 17:16:22 +02:00
Beniamino Galvani
ebb30c53cd manager: fix evaluation of manager state
The state should be set to CONNECTED_GLOBAL only when there is full
connectivity.

Fixes: 9d43869e47

https://bugzilla.gnome.org/show_bug.cgi?id=785281
2017-10-20 10:37:11 +02:00
Beniamino Galvani
5b50564a8a merge: branch 'bg/close-rh1451236'
https://bugzilla.redhat.com/show_bug.cgi?id=1451236
2017-10-19 15:52:13 +02:00
Thomas Haller
de4742333a core: add option to pass ownership of file descriptor to nm_utils_fd_get_contents()
In many scenarios, we have no use for the file descriptor
after nm_utils_fd_get_contents(). We just want to read it
and close it.

API wise, it would be nice that the get_contents() function never
closes the passed in fd and it's always responsibility of the caller.

However, that costs an additional dup() syscall that could
be avoided, if we allow the function to (optionally) close
the file descriptor.
2017-10-19 15:49:58 +02:00
Thomas Haller
956b3e8bd5 shared: add nm_steal_fd() helper function 2017-10-19 15:49:58 +02:00
Beniamino Galvani
d29115c138 core: use nm_close()
Use nm_close() in the core to catch any improper use of close().
2017-10-19 15:49:58 +02:00
Beniamino Galvani
1bc1809e11 shared: introduce nm_close()
nm_close() is like close(), but throws an assertion if the input fd is
>=0 and invalid. Passing an invalid (i.e. already closed) fd to
close() is a programming error with potentially catastrophic effects,
as another thread may reuse the closed fd.
2017-10-19 15:49:50 +02:00
Beniamino Galvani
0a7b08968d libnm-core: normalize "tx_hash" when comparing team config
teamd adds the "tx_hash" property for "lacp" and "loadbalance" runners
when not present. Do the same so that our original configuration
matches with the one reported by teamd.

https://bugzilla.redhat.com/show_bug.cgi?id=1497333
2017-10-19 14:31:07 +02:00
Beniamino Galvani
5c2c7d37c3 build: create clients/common/ when building libnmc_base library
Fixes the following build error where gcc fails because the
client/common does not exist yet:

  CC       shared/nm-utils/clients_common_libnmc_base_la-nm-enum-utils.lo
 cc1: error: ./clients/common: No such file or directory [-Werror]
 cc1: all warnings being treated as errors
 make[4]: *** [shared/nm-utils/clients_common_libnmc_base_la-nm-enum-utils.lo] Error 1
 #

 libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../shared -I./shared -I../libnm-core -I./libnm-core -I../libnm -I./libnm -I../clients/common -I./clients/common ... -c ../shared/nm-utils/nm-enum-utils.c  -fPIC -DPIC -o shared/nm-utils/.libs/clients_common_libnmc_base_la-nm-enum-utils.o
 cc1: error: ./clients/common: No such file or directory [-Werror]

Fixes: 3434261811
2017-10-19 14:21:59 +02:00
Beniamino Galvani
597072296a core: don't close input fd in nm_utils_fd_get_contents()
The function should not close the input file descriptor; however
fdopen() associates the fd to the new stream so that when the stream
is closed, the fd is too. The result is a double close() and the
second call can in certain cases affect a wrong fd.

Use a duplicate fd for the stream.

Fixes: 1d9bdad1df

https://bugzilla.redhat.com/show_bug.cgi?id=1451236
2017-10-19 09:03:28 +02:00
Thomas Haller
d1a58fbfbf ifcfg-rh: limit reading GATEWAY_PING_TIMEOUT to 600 seconds
libnm-core limits the rande for GATEWAY_PING_TIMEOUT to 0 to 600.
See commit e86f8354a7, "device: restart
ping process when it exits with an error".

The reader must not pass value out of range to g_object_set().
Clamp and warn.
2017-10-18 17:54:53 +02:00
Thomas Haller
ab1e672a21 dhcp: include "nm-dhcp-manager.h" in "nm-dhcp-listener.c"
"nm-dhcp-manager.h" forward declares _nm_dhcp_manager_factories.
We need to make the definition aware of the declaration, so
that the compiler can warn if they differ.
2017-10-18 16:22:22 +02:00
Thomas Haller
92774592d4 systemd: re-merge branch 'systemd'
We moved 3 files (siphash24.[hc], unaligned.h) to shared/nm-utils.
Re-merge with systemd branch, so that future updates work without
problems.
2017-10-18 13:39:34 +02:00
Thomas Haller
268e0cd22e systemd: update code from upstream (2017-10-11)
This is a direct dump from systemd git on 2017-10-11, git commit
0da812036f6fd60a7b5477fafb2eead9e98f4c78.

======

SYSTEMD_DIR=../systemd
COMMIT=0da812036f6fd60a7b5477fafb2eead9e98f4c78

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

git ls-files :/src/systemd/src/ \
             :/shared/nm-utils/siphash24.c \
             :/shared/nm-utils/siphash24.h \
             :/shared/nm-utils/unaligned.h | \
  xargs -d '\n' rm -f

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

nm_copy_sd_shared() {
    mkdir -p "./shared/nm-utils/"
    cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${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/extract-word.c"
nm_copy_sd "src/basic/extract-word.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/process-util.h"
nm_copy_sd "src/basic/process-util.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/signal-util.h"
nm_copy_sd_shared "src/basic/siphash24.c"
nm_copy_sd_shared "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_shared "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-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/id128-util.c"
nm_copy_sd "src/libsystemd/sd-id128/id128-util.h"
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"
2017-10-18 13:38:03 +02:00
Thomas Haller
0f1248b60c all: merge branch 'th/hash'
Change our hashing algorithm to use siphash24.

https://github.com/NetworkManager/NetworkManager/pull/32
2017-10-18 13:30:21 +02:00
Thomas Haller
1410c6376e platform: don't hash the compare type in nm_platform_ip4_route_hash_update()
We don't need this extra distinguisher. It makes no sense to ever
compare two routes with a different compare-type.

Also, the number of fields that is hashed already differs between each
compare type. If we have a good hashing algorithm, this already suffices
that the hash value looks largely different.
2017-10-18 13:29:22 +02:00
Thomas Haller
f17a20c568 core: refactor hashing to use reduce calls to siphash24_compress()
This makes for example nm_platform_link_hash_update() by roughly 25%
faster.
2017-10-18 13:29:22 +02:00
Thomas Haller
cfe8546df9 all: extend hash functions with an NMHashState argument
We often want to cascade hashing, meaning, to combine the
outcome of various hash functions in a larger hash.

Instead of having each hash function return a guint hash value,
accept a hash state argument. This saves the overhead of initializing
and completing the intermediate hash states.
It also avoids loosing entropy when we reduce the larger hash state
into the intermediate guint hash value.
2017-10-18 13:29:22 +02:00
Thomas Haller
2f56de7492 all: add helper functions for nm_hash_update*()
By using a macro, we don't cast all the types to guint. Instead,
we use their native types directly. Hence, we don't need
nm_hash_update_uint64() nor nm_hash_update_ptr().
Also, for types smaller then guint like char, we save hashing
the all zero bytes.
2017-10-18 13:29:22 +02:00
Thomas Haller
ee76b0979f all: use siphash24 for hashing
siphash24() is wildly used by projects nowadays.

It's certainly slower then our djb hashing that we used before.
But quite likely it's fast enough for us, given how wildly it is
used. I think it would be hard to profile NetworkManager to show
that the performance of hash tables is the issue, be it with
djb or siphash24.

Certainly with siphash24() it's much harder to exploit the hashing
algorithm to cause worst case hash operations (provided that the
seed is kept private). Does this better resistance against a denial
of service matter for us? Probably not, but let's better be safe then
sorry.

Note that systemd's implementation uses a different seed for each hash
table (at least, after the hash table grows to a certain size).
We don't do that and use only one global seed.
2017-10-18 13:27:02 +02:00
Thomas Haller
3434261811 core,clients: use our own string hashing function nm_str_hash()
Replace the usage of g_str_hash() with our own nm_str_hash().

GLib's g_str_hash() uses djb2 hashing function, just like we
do at the moment. The only difference is, that we use a diffrent
seed value.

Note, that we initialize the hash seed with random data (by calling
getrandom() or reading /dev/urandom). That is a change compared to
before.

This change of the hashing function and accessing the random pool
might be undesired for libnm/libnm-core. Hence, the change is not
done there as it possibly changes behavior for public API. Maybe
we should do that later though.

At this point, there isn't much of a change. This patch becomes
interesting, if we decide to use a different hashing algorithm.
2017-10-18 13:05:00 +02:00
Thomas Haller
0e9e35e309 all: refactor hashing by introducing NMHashState
The privious NM_HASH_* macros directly operated on a guint value
and were thus close to the actual implementation.

Replace them by adding a NMHashState struct and accessors to
update the hash state. This hides the implementation better
and would allow us to carry more state. For example, we could
switch to siphash24() transparently.

For now, we still do a form basically djb2 hashing, albeit with
differing start seed.

Also add nm_hash_str() and nm_str_hash():

- nm_hash_str() is our own string hashing implementation

- nm_str_hash() is our own string implementation, but with a
  GHashFunc signature, suitable to pass it to g_hash_table_new().
  Also, it has this name in order to remind you of g_str_hash(),
  which it is replacing.
2017-10-18 13:05:00 +02:00
Thomas Haller
281d2d9fad shared: split random and hash utils
"nm-utils/nm-shared-utils.h" shall contain utility function without other
dependencies. It is intended to be used by other projects as-is.

nm_utils_random_bytes() requires getrandom() and a HAVE_GETRANDOM configure
check. That makes it more cumbersome to re-use "nm-shared-utils.h", in
cases where you don't care about nm_utils_random_bytes().

Split nm_utils_random_bytes() out to a separate file.

Same for hash utils, which depend on nm_utils_random_bytes(). Also, hash
utils will eventually be extended to use siphash24.
2017-10-17 20:02:59 +02:00
Thomas Haller
1766bbeab4 test: add gdbus leak to valgrind.suppressions
==28576== 78 (72 direct, 6 indirect) bytes in 1 blocks are definitely lost in loss record 843 of 1,311
  ==28576==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
  ==28576==    by 0x6FD0A38: g_malloc (gmem.c:94)
  ==28576==    by 0x6FE8575: g_slice_alloc (gslice.c:1025)
  ==28576==    by 0x6FE8A08: g_slice_alloc0 (gslice.c:1051)
  ==28576==    by 0x7010261: g_system_thread_new (gthread-posix.c:1152)
  ==28576==    by 0x6FF283E: g_thread_new_internal (gthread.c:874)
  ==28576==    by 0x6FF28E7: g_thread_new (gthread.c:827)
  ==28576==    by 0x6FCC4A3: g_get_worker_context (gmain.c:5851)
  ==28576==    by 0x681A814: g_task_thread_pool_init (gtask.c:1977)
  ==28576==    by 0x681A814: g_task_get_type (gtask.c:592)
  ==28576==    by 0x685CB50: ensure_required_types (gdbusprivate.c:231)
  ==28576==    by 0x685CB50: _g_dbus_initialize (gdbusprivate.c:1927)
  ==28576==    by 0x6850CA0: g_bus_get_sync (gdbusconnection.c:7267)
  ==28576==    by 0x10B6AC: nmtstc_service_init (nm-test-utils-impl.c:91)
  ==28576==    by 0x10D261: test_setup (test-secret-agent.c:249)
  ==28576==    by 0x6FF118B: test_case_run (gtestutils.c:2160)
  ==28576==    by 0x6FF118B: g_test_run_suite_internal (gtestutils.c:2244)
  ==28576==    by 0x6FF139A: g_test_run_suite_internal (gtestutils.c:2256)
  ==28576==    by 0x6FF139A: g_test_run_suite_internal (gtestutils.c:2256)
  ==28576==    by 0x6FF1571: g_test_run_suite (gtestutils.c:2332)
  ==28576==    by 0x6FF1590: g_test_run (gtestutils.c:1599)
  ==28576==    by 0x10D0EE: main (test-secret-agent.c:654)
2017-10-17 20:02:59 +02:00
Thomas Haller
acbab884ee shared: add _NM_ENSURE_TYPE() macro 2017-10-17 20:02:59 +02:00
Thomas Haller
bdb8e65434 shared: add _nm_align() and _nm_alignof() macros 2017-10-17 20:02:59 +02:00
Thomas Haller
e71f7775a7 platform: fix comparing parent_ifindex in nm_platform_lnk_macsec_cmp() 2017-10-17 15:04:49 +02:00
Beniamino Galvani
1c7281c771 clients: merge branch 'bg/tui-activation-rh1500651'
https://bugzilla.redhat.com/show_bug.cgi?id=1500651
2017-10-16 19:51:16 +02:00
Beniamino Galvani
90aa8a8b7b tui: fix memory leak 2017-10-16 17:43:37 +02:00
Beniamino Galvani
c898594c71 tui: improve tracking of activation state
nmtui determines the activation result by tracking the active
connection state but that is not enough, as the active connection may
disappear or because we need to consider also the device state in some
particular cases.

Use the same logic implemented in nmcli that is now provided by the
nmc_activation_get_effective_state() helper.
2017-10-16 17:43:37 +02:00
Beniamino Galvani
1824cc9e3f clients: move get_effective_activation_state() to nm-clients-utils.c 2017-10-16 17:26:49 +02:00
Beniamino Galvani
aa964ae969 build: move nm-client-utils.c to libnmc-base.a
In a later commit we'll add a new generic client function used by
nmcli and nmtui. nm-client-utils.c seems the right place for it, so
move the file to the base library that is used by both clients.

While at it, also put in that file some functions that will be needed
by nmtui.
2017-10-16 17:25:35 +02:00
Beniamino Galvani
aec559cea5 cli: split evaluation of activation state
The code used to determine the activation state is useful for other
clients as well, let's split it into a dedicated function that can be
shared.
2017-10-16 17:25:30 +02:00
Beniamino Galvani
802116db43 tui: add group-forward-mask property to bridge page
The validation on allowed bits is done when the user saves the
connection.

https://bugzilla.redhat.com/show_bug.cgi?id=1358615
2017-10-13 14:17:26 +02:00
Francesco Giudici
76c5b2f94e libnm-core: remove duplicate include of "nm-utils-private.h" 2017-10-13 13:55:02 +02:00
Thomas Haller
369d222e98 core: merge branch 'th/random' 2017-10-13 12:47:58 +02:00
Thomas Haller
c978b9dfe5 core: randomize hash seed with a global seed
This makes hashing non-deterministic with the aim to
make it harder to exploit hash collisions.

Non-deterministic also means that for unit testing
we will get different values on each run. But since we
shall never assign any meaning to these hash values
nor rely on them being stable between restarts (or
upgrades), that doesn't hurt.
2017-10-13 12:47:55 +02:00
Thomas Haller
4a2798434e core: introduce NM_HASH_INIT() to initialize hash seed
Introduce a NM_HASH_INIT() function. It makes the places
where we initialize a hash with a certain seed visually clear.

Also, move them from "shared/nm-utils/nm-shared-utils.h" to
"shared/nm-utils/nm-macros-internal.h". We might want to
have NM_HASH_INIT() non-inline (hence, define it in the
source file).
2017-10-13 12:47:55 +02:00
Thomas Haller
fb6fecc036 dhcp: use nm_utils_random_bytes() for generating random DUID 2017-10-13 12:47:55 +02:00
Thomas Haller
b01a453ca2 core: add nm_utils_random_bytes() and use getrandom()
Add a new function nm_utils_random_bytes().

This function now preferably uses getrandom() syscall if it is
available.

As fallback, it always tries to fill the buffer from /dev/urandom.
If it cannot, as last fallback it uses GRand, which cannot fail.
Hence, the function always sets some (pseudo) random bytes.

It also returns FALSE if the obtained bytes are possibly not good
randomness.
2017-10-13 12:47:55 +02:00
Thomas Haller
93ea7a5905 shared: move nm_utils_fd_*() from src/ to shared/nm-utils/
The functions are general purpose and independent from NetworkManager core.
Move them to "shared/nm-utils/" so they can be used independently.
2017-10-13 12:47:55 +02:00
Thomas Haller
373684fdc0 shared: add _nm_thread_local macro
Copied and adjusted from systemd.
2017-10-13 12:47:55 +02:00
Beniamino Galvani
d554f535af shared: fix gtk-doc build warning
Fixes the following:

 shared/nm-utils/nm-shared-utils.c:136: Warning: NetworkManager: GTK-Doc comment block end token "*/" should not be preceded by comment text:
 * Returns: the input buffer with the quoted string. */
2017-10-13 12:10:02 +02:00
Beniamino Galvani
a30ce8086d libnm-core: specify enum values in NMSettingIP6Config:addr-gen-mode doc
So that the man page will display:

  The permitted values are: NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64
  (0) or NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1).

instead of

  The permitted values are: "eui64" or "stable-privacy".

since the latter is not useful at all for a int32 property.
Unfortunately the enum names are quite long and don't look very well
in a table, but that's another problem.
2017-10-13 12:04:41 +02:00
Thomas Haller
5a00811b5a contrib/rpm: explicitly set default dhcp configuration
It will also be autodetected, but be explicit about it.
2017-10-12 11:06:30 +02:00
Christian Kirbach
2a5b04d06d po: update German (de) translation (bgo#788638)
https://bugzilla.gnome.org/show_bug.cgi?id=788638
2017-10-12 10:58:52 +02:00
Thomas Haller
960a11951c ndisc: merge branch 'th/ndisc-route-preference-rh1445417'
https://bugzilla.redhat.com/show_bug.cgi?id=1445417
2017-10-12 10:42:23 +02:00
Thomas Haller
032b4e4371 core: use router preference for IPv6 routes
For routes and the default-route from NDisc, set the router preference
RTA_PREF.

Also, previously, we would only configure one IPv6 default-route. That by itself
was not really a problem, as long as NetworkManager would always make sure that
it configured the route to the ~best~ router.

Actually, NM should have done that already. It keeps the list of gateways
sorted, and prefers them according to their preference. But maybe
it didn't, so we have bug rh#1445417 (??).

Change that by configuring a default-route for all gateways, with
appropriate router prefrence. In case, kernel doesn't support RTA_PREF
yet, only configure all routes that share the same maxiumum preference.

https://bugzilla.redhat.com/show_bug.cgi?id=1445417
2017-10-12 10:38:19 +02:00