Commit Graph

21088 Commits

Author SHA1 Message Date
Thomas Haller
bdd7d858f3 ifcfg-rh: return from svSetValue*() functions whether anything changed 2017-05-30 11:10:19 +02:00
Thomas Haller
efd462d946 ifcfg-rh: fix writing NETMASK in write_ip4_setting() 2017-05-30 11:10:19 +02:00
Lubomir Rintel
2a5076f9ee po: bring back Polish translation fixes
Zanata seems to corrupt the translations: https://zanata.atlassian.net/browse/ZNTA-2007
2017-05-29 19:00:58 +02:00
Lubomir Rintel
6b3c7b60c2 po: update Japanese translation
From the Red Hat translators. Fix up the bad msgmerge.
2017-05-29 17:45:11 +02:00
Lubomir Rintel
9d1bf05eda po: fix line ending in Japan translation 2017-05-29 17:40:20 +02:00
Lubomir Rintel
0fcae6c260 po: update translations from Zanata
And make -C po update-po to canonicalize them.
2017-05-29 17:36:32 +02:00
Adonis Papaderos
700c42fe1c po: small translation fix for the Greek language.
https://bugzilla.gnome.org/show_bug.cgi?id=783182
2017-05-29 17:17:15 +02:00
Lubomir Rintel
9c272e2612 po: update Japanese translation
From the Red Hat translators.
2017-05-29 16:25:37 +02:00
Lubomir Rintel
c859caa520 po: update translations from Zanata 2017-05-29 16:24:42 +02:00
Thomas Haller
c244cc9415 shared: merge branch 'th/shared-address-range'
https://github.com/NetworkManager/NetworkManager/pull/20
2017-05-29 11:21:34 +02:00
Thomas Haller
d512ed9f1f dnsmasq: fix generating shared IPv4 address range
Change behavior for the network-address and broadcast-address.
Users should not specify such addresses, but if they do, generate
something more sensible.

Also, if the address was in network larger then /24, the
generated address range was rather unexpected. Change behavior
here.

There are no particularly strong reasons for the chosen range.
It just seems suitable. The decision to hand out at most a /24
is because it is likely to be plenty, and because that is what
the previous code did -- at least, if the address was in the
first /24 of the subnet. See how the result for 192.168.0.1/20
is unchanged, but 192.168.1.1/20 changes.
2017-05-29 11:10:36 +02:00
Thomas Haller
e4ae34584b dnsmasq/tests: add more tests for test_address_ranges() 2017-05-29 11:10:36 +02:00
Thomas Haller
76492632b9 device: cleanup generating shared-IP in shared4_new_config()
Changes:

- merge reserve_shared_ip() into shared4_new_config().
  shared4_new_config() needs to register release_shared_ip(). However, it
  wrongly would always register release_shared_ip(), even for user-supplied
  addresses. To fix that, we would need yet another argument to
  reserve_shared_ip() and coupling it even more with shared4_new_config().
  At that point, it's cleaner to just merge the two functions.

- only create the shared_ips hash when needed, and delete it when
  it's empty. The idea is, that NetworkManager possibly runs for a long
  time, and most of the time no shared connection is active. Just clean
  up the empty hash while we don't need it.
2017-05-29 11:10:36 +02:00
Adonis Papaderos
6b6d7e411a po: small translation fix for the Greek language.
https://bugzilla.gnome.org/show_bug.cgi?id=783182
2017-05-29 07:59:11 +02:00
Thomas Haller
53c0e5fa97 tui: merge branch 'tui-bond-cloned-mac-addr'
https://github.com/NetworkManager/NetworkManager/pull/19
2017-05-28 23:27:31 +02:00
Nikolay Martynov
fd14aa033e nmtui: add support for cloned mac in bond interfaces
This is useful because bond gets its mac from first slave and order of
slave attachement is not guaranteed.
For example if we have bond with wifi and ethernet we want mac from
wifi to be use by bond interface because many wifi defices do now
allow one to send data with spoofed macs.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
2017-05-28 23:22:55 +02:00
Nikolay Martynov
6a4af482f0 nmtui: always create ethernet settings for VLAN and wireless security for wifi.
Ethernet settings for VLAN are always created later in settings
normalization. We might as well always created them.

This fixes a user visible problem: currently if user specifies cloned
mac when connection is created this value doesn't get saved. User has
to go, edit saved connection to add it again.

Similar problem existed for wireless security and wifi

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
2017-05-28 23:22:55 +02:00
Mike Gilbert
a5691020f8 configure: look for pre-generated docs in srcdir
This allows the docs to be found when performing an out-of-source build.

https://mail.gnome.org/archives/networkmanager-list/2017-May/msg00074.html
2017-05-28 17:35:50 +02:00
Yuri Chornoivan
0050e8bd34 all: fix typos in documentation, translated strings and comments
https://bugzilla.gnome.org/show_bug.cgi?id=783173
2017-05-28 17:33:37 +02:00
Thomas Haller
7bafe6dece platform/tests: merge branch 'th/platform-tests' 2017-05-27 23:22:37 +02:00
Thomas Haller
d3c71ce4da platform/tests: use nm_platform_link_veth_add() to create veth pair in test 2017-05-27 23:16:56 +02:00
Thomas Haller
6ab2288c28 platform: add nm_platform_link_veth_add() to create VETH links 2017-05-27 23:16:56 +02:00
Thomas Haller
b14c07f70e device: remove unused private data for NMDeviceVeth 2017-05-27 23:16:56 +02:00
Thomas Haller
2c4d9f66ae platform/tests: recreate test environment for each route test
Use nmtstp_env1_add_test_func*() to setup and teardown a new
interface for each test.
2017-05-27 23:16:56 +02:00
Thomas Haller
a367361bc8 platform/tests: refactor test_ip6_route_options() to make it extendable
Have it suitable for multiple scenarios.
2017-05-27 23:16:56 +02:00
Thomas Haller
0f905a0b88 platform/tests: move test fixture "env1" from test-address.c to test-common.h
nmtstp_env1_add_test_func() allows to register test functions in a
particular test environment ("env1", for lack of a better name).

It will be reused for "test-route.c"
2017-05-27 23:16:56 +02:00
Thomas Haller
1056a28231 tests: extend nmtst_add_test_func() with setup and teardown functions 2017-05-27 23:16:56 +02:00
Thomas Haller
1b046039d1 device: minor cleanup replacing g_slist_for_each() by iteration
Iterating a list is so easy, it's easier to just do it by
hand, then splitting the functionality accross multiple lines.
2017-05-27 11:38:38 +02:00
Thomas Haller
d1b951a7e5 platform: remove plen argument for IPv6 address ID
The prefix length is not part of the ID for IPv6 address. Remove
it from nmp_object_stackinit_id_ip6_address().
2017-05-27 11:38:38 +02:00
Thomas Haller
59e31ab6ea libnm: cleanup argument types for init_if() function
We use init_if() as handler for g_list_foreach(). Since we already
cast the function pointer because it doesn't have (GFunc) signature,
we can just as well use the correct types right away.
2017-05-27 11:38:38 +02:00
Beniamino Galvani
ce956a240b clients: fix MTU setter function
Don't reuse _set_fcn_gobject_int_impl() because it requires
gobject_int subtype data in the property info, while MTU properties
have mtu subtype data.
2017-05-26 18:16:19 +02:00
Francesco Giudici
adbf383628 device: when setting back a device to managed, update internal sys state
Otherwise a device which was set as unmanaged (updated to the REMOVED
internal sys-state) will never update its own sys-state if later set
back as managed.
Manage either when setting explictly the device to managed either when
just upping a connection on an unmanaged device.
2017-05-26 15:47:25 +02:00
Francesco Giudici
55b8ba4ddc device: add the internal interface state to the state change log message 2017-05-26 15:47:18 +02:00
Thomas Haller
cd6449f162 cli: change check_activated() to ensure we don't miss a deactivation
In the previous code it is not clear to me that there won't be
a situation where we don't react on a state change, waiting for a
device-state-change that never comes.

Now, only wait for a better device-state reason if:

 - we have a device
 - and the ac-reason is unspecific (NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED)
 - and the device still references the current active connection
 - and the device state is not yet FAILED or DISCONNECTED.

The most important change is that we only wait longer, if the device's
active-connection is still the same as our current active connection.

I don't think this commit is really necessary, but I cannot understand
the previous logic.

See-also: 57a26fd2aa
2017-05-25 10:59:15 +02:00
Thomas Haller
4f69c1e85e cli: prettify check_activated() to by using switch() statement
No change in behavior.
2017-05-24 22:00:05 +02:00
Beniamino Galvani
31656a066b core: add configuration flag to choose slaves activation order
Commits 39d0559d9a ("platform: sort links by name instead of
ifindex") and 529a0a1a7f ("manager: sort slaves to be autoconnected
by device name") changed the order of activation of slaves. Introduce
a system-wide configuration property to preserve the old behavior.

https://bugzilla.redhat.com/show_bug.cgi?id=1452585
2017-05-24 15:56:15 +02:00
Thomas Haller
44df6d7938 core: don't enable setrlimit(RLIMIT_CORE) when running with address sanitizer
With address sanitizer, the call to setrlimit() fails by default,
because the core dump would be huge. That could be overwritten via

  ASAN_OPTIONS=disable_core=0

But just don't try to enable core-dumps with asan.
2017-05-24 13:56:12 +02:00
Beniamino Galvani
3355a2823b device: release removed devices from master on cleanup
On cleanup, unconditionally release a device from its master if the
link is missing or it doesn't have a master, otherwise the master
would later try to release the slave, hitting the following assertion:

 "nm_platform_link_release: assertion 'slave > 0' failed"
  #0  g_logv
  #1  g_log
  #2  g_return_if_fail_warning
  #3  nm_platform_link_release
  #4  release_slave
  #5  nm_device_master_release_one_slave
  #6  slave_state_changed
  #7  ffi_call_unix64
  #8  ffi_call
  #9  g_cclosure_marshal_generic
  #10 g_closure_invoke
  #11 signal_emit_unlocked_R
  #12 g_signal_emit_valist
  #14 _set_state_full
  #15 nm_device_state_changed
  #16 nm_device_unrealize
  #17 _platform_link_cb_idle
  #18 g_main_context_dispatch
  #19 g_main_context_dispatch
  #20 g_main_context_iterate
  #21 g_main_loop_run
  #22 main

Fixes: 9e8218f99a

https://bugzilla.redhat.com/show_bug.cgi?id=1448907
2017-05-24 13:39:27 +02:00
Beniamino Galvani
c73b39c3a6 clients: fix typo 2017-05-24 10:42:33 +02:00
Beniamino Galvani
f15fd1e504 clients: fix meta setting descriptor for connection.autoconnect-slaves
Don't specify .get_gtype for properties of enum type.

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

Fixes: c55561d303
2017-05-24 10:41:37 +02:00
Thomas Haller
22ad5422cf contrib/rpm: allow building devel RPMs without debug enabled
Since commit 1afbf948a0,
"build: use different defaults for snapshot builds",
configure would enable debugging options if the version
number is odd.

Hence, on the master branch it was no longer possible to
build an RPM without debugging enabled. Especially,

  ./contrib/fedora/rpm/build_clean.sh -g -W debug

would not work as one would expect.
2017-05-23 22:35:54 +02:00
Thomas Haller
07036d731a contrib/rpm: add option to build package with sanitizer 2017-05-23 22:00:43 +02:00
Thomas Haller
260fd3e79f cli: merge branch 'th/clients-meta-cleanup-bgo782943'
https://bugzilla.gnome.org/show_bug.cgi?id=782943
2017-05-23 13:37:19 +02:00
Thomas Haller
c72a07a604 clients: implement wifi-sec.wep-key-type as enum property
This way, we get tab completion for the enum values, and
can reuse existing code.

This requires a pre-set-notify hook, that is invoked before
setting the property.
2017-05-23 13:37:10 +02:00
Thomas Haller
8921e5db71 libnm: skip meta enum value NM_WEP_KEY_TYPE_LAST from glib-mkenums 2017-05-23 13:37:10 +02:00
Thomas Haller
d6bdf6d9dc clients: fix error message for setting flags enums
The min/max for flags must be unsigned. We need to keep track of
whether we have flags or an enum, and adjust min/max.
2017-05-23 13:37:10 +02:00
Thomas Haller
cfc9f5a9fd clients: implement team.config as string property
... with separate validation function.
2017-05-23 13:37:10 +02:00
Thomas Haller
9a68123827 clients: implement serial.parity as enum property
Previously we would only consider the first character of
value. For example, "Nonsense" was also allowed. Don't do
that anymore.
2017-05-23 13:37:10 +02:00
Thomas Haller
6c4428324e clients: implement proxy.pac-script as string property
... with separate validation function.
2017-05-23 13:37:10 +02:00
Thomas Haller
df388ea7d5 clients/trivial: rename nmc_vlan_parse_priority_maps function 2017-05-23 13:37:10 +02:00