Thomas Haller
aa00469e80
libnm/trivial: rename property enum to match property name
2019-10-18 22:09:18 +02:00
Thomas Haller
389c2ebe8a
libnm: fix GObject properties of "NMDeviceModem"
...
Fixes: f18b09b3f6 ('libnm/modem: add device id getter')
Fixes: 0b3dd18c2b ('libnm/modem: add network id getter')
Fixes: 8e270de05e ('libnm/modem: add APN getter')
2019-10-18 22:09:18 +02:00
Thomas Haller
57c1b03c5c
libnm: add G_PARAM_STATIC_STRINGS flag to NM_VPN_SERVICE_PLUGIN_DBUS_WATCH_PEER property
2019-10-18 22:09:18 +02:00
Thomas Haller
f1bd85634a
libnm: belatedly add GObject property "NMDeviceOvs{Bridge,Port}:slaves"
...
Fixes: 5f30a2b525 ('libnm: add accessors for ovs port/bridge slaves')
2019-10-18 22:09:18 +02:00
Thomas Haller
26391a92da
libnm: remove unused enum value from "nm-object.c"
2019-10-18 22:09:18 +02:00
Thomas Haller
58a48acfd9
libnm: rework caching singleton value in _nm_dbus_bus_type()
...
No need for g_once_init_enter(). In case of a race, we can just
twice determine the value. As long as only one thread wins the race,
this is totally fine (also, both threads probably would give the same
result anyway).
2019-10-18 22:09:18 +02:00
Thomas Haller
a57a1ba2fc
libnm/tests: add test for checking types
...
If a "nm_${TYPE}_class_init()" function has a bug, then this
code only runs when the class gets instanciated. And for types
like NMDeviceBridge, that didn't happen for unit tests (so far).
Instanciate all glib types. In the future we may want to perform
additional checks on the types.
2019-10-18 22:09:18 +02:00
Thomas Haller
8f37a0ae0a
build: link "nm-enum-types.c" with the base "liblibnm" instead of "libnm"
...
This way the symbols are also available to the unit tests.
2019-10-18 22:09:18 +02:00
Thomas Haller
69de5ee4e9
shared: move nm_utils_parse_debug_string() from core to shared
2019-10-18 22:09:18 +02:00
Thomas Haller
308beb85fe
shared: add nm_c_list_for_each_entry_prev() helper macro
...
It's non-trivial to get this right. Add the macro for iterating the list
in reverse.
2019-10-18 22:09:18 +02:00
Thomas Haller
c02710bb0f
shared: add nm_g_source_destroy_and_unref() helper
2019-10-18 22:09:18 +02:00
Lubomir Rintel
79b383e3b7
merge: branch 'lr/nmcli-d-wifi-show'
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/272
2019-10-18 17:39:41 +02:00
Lubomir Rintel
7061341a41
cli: add "nmcli d wifi show"
...
A quick overview of the currently connected Wi-Fi network, including
credentials. Comes handy if someone wants to connect more devices to
their Hotspot or the same network as they are connected to.
2019-10-18 17:38:57 +02:00
Lubomir Rintel
976eebae73
cli/devices: keep the AddAndActivateInfo alive until the activation ends
...
In a future commit it will be useful to know whether the activation
details when the activation succeeds.
This also makes the state tracking of the ongoing activation more
elegant, since we got our device and AC neatly packed together and we
can treat their respective state changes consistently.
2019-10-18 17:38:57 +02:00
Lubomir Rintel
8766d05ea9
cli/devices: on connecting a device, don't uselessly look it up from the ac
...
For quite some time we already pass the AddAndActivateInfo for device
connect too, and that one remembers the device.
2019-10-18 17:38:57 +02:00
Lubomir Rintel
2ca172ebea
utils: correct caching of can_show_graphics
...
It's being forgotten unless it's also static. Spotted by Thomas in the
code that was copied from here.
2019-10-18 17:38:57 +02:00
Beniamino Galvani
a5f22dbc5d
dhcp: merge branch 'bg/dhcp-invalid-hostname'
...
https://bugzilla.redhat.com/show_bug.cgi?id=1744427
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/310
2019-10-18 06:34:54 +02:00
Beniamino Galvani
2da4d54ac3
dhcp: ignore hostname when invalid
...
The hostname used for DHCP can be the one obtained from the hostnamed
service and is not guaranteed to be valid, at least with systemd
239. Instead of sending an invalid DHCP option to the server or
failing due to later checks in clients, ignore the hostname and log a
warning when it is invalid.
https://bugzilla.redhat.com/show_bug.cgi?id=1744427
2019-10-17 18:05:20 +02:00
Beniamino Galvani
38f942e038
shared: export systemd dns and hostname validation functions
2019-10-17 18:04:29 +02:00
Beniamino Galvani
319a39cac6
shared: fix function return value
2019-10-17 18:04:29 +02:00
Ilya Shipitsin
c0f4c2f2e6
platform: silence cppcheck warning about NULL pointer dereference
...
found by cppcheck
[src/platform/nm-platform.c:4143] -> [src/platform/nm-platform.c:4141] -> [src/platform/nm-platform.c:3912] -> [src/platform/nm-platform.c:3884]: (warning) Null pointer dereference: addresses
[bgalvani@redhat.com: reworded commit message]
https://github.com/NetworkManager/NetworkManager/pull/353
2019-10-17 15:13:18 +02:00
Thomas Haller
cb4bd173eb
libnm: fix nm_device_delete_async() after GDBusConnection rework
...
Fixes: c1046dd803 ('libnm: implement nm_device_delete()/nm_device_delete_async() by using GDBusConnection directly')
2019-10-17 15:06:24 +02:00
Thomas Haller
198591a694
libnm: merge branch 'th/libnm-no-dbus-codegen-1'
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/299
2019-10-16 18:02:42 +02:00
Thomas Haller
558dacce89
libnm: implement nm_client_add_connection*() by using GDBusConnection directly
2019-10-16 08:56:01 +02:00
Thomas Haller
5f31fd3951
libnm: implement nm_client_save_hostname_async() by using GDBusConnection directly
2019-10-16 08:56:01 +02:00
Thomas Haller
90487ef509
shared: allow "NMRefString" typedef to be forward declared by naming the struct
2019-10-16 08:56:00 +02:00
Thomas Haller
c92eb66d38
libnm: implement nm_client_save_hostname() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
356f1f6f33
libnm: implement nm_client_reload_connections_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
89c1007f92
libnm: implement nm_client_reload_connections() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
4af6219226
libnm: implement nm_client_load_connections_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
d795bcd730
libnm: implement nm_client_load_connections() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
c1046dd803
libnm: implement nm_device_delete()/nm_device_delete_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
6ee416d247
libnm: implement nm_device_disconnect()/nm_device_disconnect_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
bafabddece
libnm: implement nm_device_get_applied_connection()/nm_device_get_applied_connection_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
3a66761b92
libnm: implement nm_device_reapply()/nm_device_reapply_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
36df8eabe6
libnm: implement nm_remote_connection_get_secrets()/nm_remote_connection_get_secrets_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
fb3d91db30
libnm: implement nm_remote_connection_delete()/nm_remote_connection_delete_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
dd94a8c0a9
libnm: implement nm_remote_connection_save()/nm_remote_connection_save_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
eff5e730ef
libnm: implement nm_remote_connection_update2() by using GDBusConnection directly
...
Also, implement nm_remote_connection_commit_changes_async() by calling
nm_remote_connection_update2(). It already was also calling the
Update2() D-Bus method.
2019-10-16 08:56:00 +02:00
Thomas Haller
79fbe7a578
libnm: implement nm_remote_connection_commit_changes() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
7871105ff9
libnm: implement nm_device_wifi_p2p_start_find()/nm_device_wifi_p2p_stop_find() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
999e4c6692
libnm: implement nm_device_wifi_request_scan_async() by using GDBusConnection directly
...
No longer keep track if a request is already pending. Previously,
in that case, the function would return success in an idle handler.
Instead, just always issue the new request. It's up to the caller to
rate-limit the requests and trigger a scan whenever appropriate. libnm
should not add additional logic to that.
2019-10-16 08:56:00 +02:00
Thomas Haller
e2b27f5736
libnm: implement nm_device_wifi_request_scan() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
09e275dc28
libnm: implement nm_client_reload() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
b1871a7549
libnm: implement nm_client_checkpoint_adjust_rollback_timeout() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
1bce0a090f
libnm: implement nm_client_checkpoint_rollback() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
3a50585391
libnm: implement nm_client_checkpoint_destroy() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
5bdffa0ffd
libnm: implement nm_client_checkpoint_create() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
b44d883d92
libnm: implement nm_client_check_connectivity_async() by using GDBusConnection directly
2019-10-16 08:56:00 +02:00
Thomas Haller
9bc83ca102
libnm: implement nm_client_check_connectivity() by using GDBusConnection directly
...
Note that nm_client_check_connectivity() has this odd behavior of
updating the connectivity state right away. We keep doing that.
2019-10-16 08:56:00 +02:00