Commit Graph

18368 Commits

Author SHA1 Message Date
Lubomir Rintel
7b5712acd2 core: allow two priorities of base settings
We'll need two "base" settings for Bluetooth NAP connections: bridge to set up
the actual link and bluetooth to identify the HCI to register the network
server with.

Let's use two priorities for base setting, with "1" marking one of higher
priority and "2" of lower priority when both are present.
2017-05-31 20:15:01 +02:00
Lubomir Rintel
02e527f644 core/connections: pick base setting from settings the connection actually has
We will need multiple base settings for Bluetooth NAP servers: bluetooth and
bridge. We want to identify the device as "bluetooth" to the user, but leave
the Bridge factory handle it.

The "connection.type" is somewhat redundant -- let's keep it for what the user
sees. And identify the actual base setting to pick the right factory by the
actually present setting.
2017-05-31 20:14:17 +02:00
Lubomir Rintel
15daf29220 bluez5: avoid leaking the interface dictionary 2017-05-31 20:11:46 +02:00
Lubomir Rintel
1bb751b9d1 bluez5: use _NMLOG 2017-05-31 20:11:15 +02:00
Lubomir Rintel
28505ae92b build: don't drop the test suite log on failure
Fixes: 2198f73b0e
2017-05-31 20:11:11 +02:00
Lubomir Rintel
1a20611f66 bluetooth/trivial: rename the defines 2017-05-31 20:10:30 +02:00
Lubomir Rintel
43c43d5e3a bluetooth: streamline NMBluez5Manager teardown a bit 2017-05-31 20:05:53 +02:00
Lubomir Rintel
c22672b383 libnm-core: fix verify() implementations to allow connection=NULL 2017-05-31 20:05:53 +02:00
Lubomir Rintel
0d71c0569f ifcfg: drop an unused variable 2017-05-31 19:50:58 +02:00
Thomas Haller
b8707cba3c platform/tests: minor fix in _wait_for_ipv6_addr_non_tentative()
For better or worse, there is a platform argument. Use it instead
of the singleton.
2017-05-31 11:01:52 +02:00
Thomas Haller
902085c879 platform/tests: merge minor refactoring of route-tests 2017-05-31 10:53:32 +02:00
Thomas Haller
d6aae6af72 platform/tests: reorder wait-loop in test_ip6_route_options()
- no need to call nm_platform_process_events() after
  nmtstp_wait_for_signal(). The latter processes all events
  that are pending.
- with addr_n number of addresses, we still only want to wait
  a maximum time, not for each addresss individually. Basically,
  the for-loop must be inside NMTST_WAIT(), not the other way around.
2017-05-31 10:46:43 +02:00
Thomas Haller
07751b444b platform/tests: make timeout_ms argument for nmtstp_wait_for_signal() signed
Having an unsigned "guint timeout_ms" argument is very inconvenient, because

    nmtstp_wait_for_signal (NM_PLATFORM_GET (), end_time - now_time);

might easily be negative. In such a case, the correct behavior
is to wait not at all.
2017-05-31 10:46:43 +02:00
Thomas Haller
af9c474844 platform/tests: change nmtstp_wait_for_signal() to wait with zero timeout
The previous behavior, of treating timeout_ms as *no timeout*, makes
no sense. At least not for unit tests. If you have a really long timeout,
then set it. "0" should really mean to schedule a zero timeout.
2017-05-31 10:46:43 +02:00
Thomas Haller
75f3c026eb shared/tests: expose end-time from NMTST_WAIT() macro 2017-05-31 10:46:43 +02:00
Thomas Haller
5235b1740f shared/tests: document how to disable slow tests at compile-time 2017-05-31 10:46:43 +02:00
Francesco Giudici
21a941d40b platform/tests: fix test_ip6_route_options
when adding a route with RTA_PREFSRC some kernel versions will reject
the request if the specified source address is still tentative: be sure
that the just added addresses are no more tentative before adding the
routes.
2017-05-30 19:00:54 +02:00
Thomas Haller
84f2d226b5 ifcfg-rh: fix build failure in write_wired_setting()
Fixes: f80d0eb29e
2017-05-30 18:27:37 +02:00
Thomas Haller
159cd4836f libnm: fix rejecting NMSettingVlan with id >= 4095
Without it, clients can wrongly create VLan settings with
ID 4095, which triggers assertions in NetworkManager.

Fixes: 8715d61437
2017-05-30 18:12:57 +02:00
Thomas Haller
f80d0eb29e ifcfg-rh: use svSetValueInt64_cond() to write MTU value 2017-05-30 16:37:28 +02:00
Thomas Haller
80c0a37b47 ifcfg-rh: add svSetValueInt64_cond()
There are a lot of places where we want to either write a number,
or conditionally clear it. Like:

    mtu = nm_setting_wireless_get_mtu (s_wireless);
    if (mtu)
        svSetValueInt64 (ifcfg, "MTU", mtu);
    else
        svUnsetValue (ifcfg, "MTU");
2017-05-30 16:35:13 +02:00
Thomas Haller
3443f25001 tui: use nm_streq0() in nmt_connect_connection_list_get_connection() 2017-05-30 14:33:23 +02:00
Arnaud Lefebvre
1fcbb69ae2 nmtui connect: avoid segfault when iface is not found
https://github.com/NetworkManager/NetworkManager/pull/21
2017-05-30 14:30:30 +02:00
Thomas Haller
70c0f7965d ifcfg-rh: merge branch 'th/ifcfg-netmask-legacy-rh1445414'
https://bugzilla.redhat.com/show_bug.cgi?id=1445414
2017-05-30 13:40:51 +02:00
Thomas Haller
263c5b9207 ifcfg-rh: cleanup writer by using numbered_tag() helper 2017-05-30 13:40:34 +02:00
Thomas Haller
afc76d78ed ifcfg-rh: move numbered_tag() util to "nms-ifcfg-rh-utils.h" header 2017-05-30 13:40:34 +02:00
Thomas Haller
844bf3d1a2 ifcfg-rh: fix preserving NETMASK key in write_ip4_setting()
To support legacy scripts, we want to write out the NETMASK
key whenever the ifcfg file has a NETMASK key previously.
Note, that we anyway always write the relevant PREFIX key.
The NETMASK is redundant, only there to help legacy scripts.

That was broken, because we would svUnsetValue("NETMASK") before
checking whether the NETMASK key is present.

Also, when saving a connection to ifcfg-rh file that was created
by other tools, we might mix up the numbering. E.g. we never
write out IPADDR0. Hence, turn on legacy mode whenever the ifcfg-rh
file has any key starting with "NETMASK".
2017-05-30 13:39:15 +02:00
Thomas Haller
ba05819c89 ifcfg-rh/tests: add test for reading NETMASK property 2017-05-30 11:10:19 +02:00
Thomas Haller
371b761680 build: sort filenames in Makefile.am alphabetically 2017-05-30 11:10:19 +02:00
Thomas Haller
e9d960740a ifcfg-rh: add svFindFirstKeyWithPrefix() function 2017-05-30 11:10:19 +02:00
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