| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We already need to special handle regular settings (with secrets as
GObject properties) and VPN secrets.
Next, we will also need to special handle WireGuard peers, which can
have secrets too.
Move the code to a virtual function, so that "nm-connection.c" and
"nm-setting.c" does not have explicit per-setting knowledge.
|
|
|
|
|
|
|
|
| |
- use cleanup attribute to free memory
- return floating reference from _nm_connection_for_each_secret().
It's more idiomatic that a function that constructs a variant and
returns it, returns a floating variant.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_nm_connection_for_each_secret() (formerly for_each_secret()) and
_nm_connection_find_secret() (formerly find_secret()) operate on a
GVariant of secrets. For that, they implement certain assumptions
of how to handle secrets. For example, it must special-case VPN settings,
because there is no generic abstraction to handle regular secret and VPN
secrets the same.
Such special casing should only be done in libnm-core, at one place.
Move the code to libnm-core as internal API.
|
|
|
|
|
|
|
|
|
|
|
|
| |
nm_setting_get_secret_flags() looks whether we have a suitable "-flags"
data value, or whether we have a secret with that name.
In fact, we know this is a valid secret-name. Even if there are no secret-flags
and the secret (currently) does not exists. We shall not care about the
return value.
Note that nm_setting_get_secret_flags() also for non-secrets will set
the flags to "NONE", which is just what we need.
|
|
|
|
|
| |
We cannot just blindly assume that the variant is of the right type
to iterate over it.
|
|
|
|
| |
Fixes: df6706813a698e7a697739b0940bd8f528713aab
|
|
|
|
|
|
|
|
| |
Instead of special-casing the aggregate implementation for NMSettingVpn,
delegate to a virtual function.
This will also work with other settings, that have properties/secrets
that are not GObject based properties.
|
|
|
|
|
|
|
|
| |
properties
While nm_setting_enumerate_values() should not be used anymore, still
extend it to make it workable also for properties that are not based on
GObject properties.
|
|
|
|
|
|
|
|
| |
(NMSettingEthtool)
We want to emit a change notification when gendata-based settings (like
NMSettingEthtool) change. But instead of adding a separate signal, just
emit a fake "notify:name" notification.
|
|
|
|
| |
Will be used next.
|
|\
| |
| |
| |
| |
| |
| | |
Fix LTO builds.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/76
https://bugzilla.gnome.org/show_bug.cgi?id=782525#c4
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
With LTO and optimizations, gcc issues several bogus
"maybe-uninitialized" warnings.
Work-around them by initializing the variables.
|
| |
| |
| |
| |
| | |
Otherwise, "nm-utils/nm-test-utils.h" won't work after we
include systemd headers.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is:
1) glib's MAX() macro, which evaluates arguments multiple times,
but yields a constant expression, if the arguments are constant.
2) NM's NM_MAX() macro, which evaluates arguments exactly once,
but never yields a constant expression.
3) systemd's MAX() which is like NM_MAX().
Now, it's sensible to use
char buf[MAX (A_CONSTANT, ANOTHER_CONSTANT)];
and this works with glib's variant (1).
However, when we include systemd headers, 1) gets redefined to 3), and
above no longer works. That is because we we don't allow VLA and systemd's
macro gives not a constant expression.
Add NM_CONST_MAX() macro which is like systemd's CONST_MAX(). It can
only operate on constant arguments.
|
| |
| |
| |
| |
| |
| |
| | |
Building with link-time optimization requires some tricks explained
in [1].
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200#c28
|
|/ |
|
|
|
|
|
| |
Seems 180 seconds is still not enough for "/link/create-many-links/1000"
tests on gitlab-CI.
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/290
|
| |
| |
| |
| | |
Sort by name.
|
| |
| |
| |
| |
| | |
After renaming the files, also rename all the content
to follow the "Wi-Fi P2P" naming scheme.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We named the types inconsistently:
- "p2p-wireless" ("libnm-core/nm-setting-p2p-wireless.h")
- "p2p" ("libnm/nm-p2p-peer.h")
- "p2p-wifi" ("src/devices/wifi/nm-device-p2p-wifi.h")
It seems to me, "libnm/nm-p2p-peer.h" should be qualified with a "Wi-Fi"
specific name. It's not just peer-to-peer, it's Wi-Fi P2P.
Yes, there is an inconsistency now, because there is already
"libnm/nm-access-point.h".
It seems to me (from looking at the internet), that the name "Wi-Fi P2P"
is more common than "P2P Wi-Fi" -- although both are used. There is also
the name "Wi-Fi Direct". But it's not clear which name should be
preferred here, so stick to "Wi-Fi P2P".
In this first commit only rename the files. The following commit will
rename the content.
|
| |
| |
| |
| | |
If this is going to be implemented, revert the patch.
|
| |
| |
| |
| | |
Have the class_init() function at the bottom.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Having synchronous API is wrong, or at least questionable.
Granted, libnm isn't currently very good about the exact order
of things to happen. However synchronous API by design delays events
while waiting for the response and hence messes up the ordering.
Maybe synchronous API should not be added to libnm.
Or at least, if we have synchronous API, we certainly need an asynchrnous
variant as well (which is still missing).
As synchronous API is not preferred, it should also be named
nm_some_thing_sync(), accompanied by nm_some_thing() and
nm_some_thing_finish(). The name for the synchronous method should be the
odd one and we shouldn't have an nm_some_thing_async(). Yes, libnm is not
consistend about that.
I am going to drop this API for the moment.
|
| |
| |
| |
| | |
If this is going to be implemented, revert the patch.
|
| |
| |
| |
| | |
If this is going to be implemented, revert the patch.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- fix leaking hw_address in finalize().
- reorder code.
- avoid double tabs in GObject property definitions.
- hide struct definitions from header.
- don't use signal slots in class structure.
- use NM_GOBJECT_PROPERTIES_DEFINE_BASE().
- add missing NM_AVAILABLE_IN_1_16 annotations.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't reallocate peers-array nor set it to %NULL. Instead,
just emit the signal for the peers and take them out one-by-one.
I am slightly surprised, that the peers array does not need to hold
a reference on the NMP2PPeer instances. But that seems intentional.
I think, the libnm code here should be significantly reworked, but
that is for another time.
Also, delay clearing the pointers until finalize() method. For
the most part, it shouldn't make a difference. Still avoid having
the instance in a badly defined state during dispose() (which
theoretically could be called multiple times).
|
| |
| |
| |
| |
| |
| |
| | |
The check for Wi-Fi P2P's wps-method was not correct.
While at it, move the logic to validate WPS-method flags in an utility
function.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/285
|
| | |
|
| |
| |
| |
| |
| |
| | |
We don't need to remember (and compare) all the bytes that we received.
We can just compare them right away, and remember how many good bytes
we received.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Since we only compare that the HTTP response starts with the expected
response, we need to handle the empty expected response specially
(because, every response has "" as prefix).
So now if connectivity.response is set to "" (empty) we accept:
- HTTP status code 204. We ignore and accept any extra data that we
might receive.
- HTTP status code 200 and an empty (or no) body.
|
|
|
|
|
|
| |
Fixes: 5d3736ac65f05aadd5b794f3f2595451eab3d2f7
https://bugzilla.redhat.com/show_bug.cgi?id=1671200
|
|
|
|
|
|
|
|
|
|
| |
AddAndActivate2 returns an empty a{sv} dictionary for extensibility. The
format strings to create the methods return value were slightly wrong,
causing assertion failures.
Fixes: fbb038af5e5d675c994de26da676edfd8e73ffbe
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/73
|
|
|
|
| |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/71
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nm_device_p2p_wifi_set_mgmt_iface()
<info> [1548688998.8282] device (wlan0): supplicant interface state: starting -> ready
<debug> [1548688998.8282] device[0x55bd55f19f30] (p2p-dev-wlan0): P2P: Releasing WPA supplicant interfaces.
<debug> [1548688998.8282] device[0x55bd55f19f30] (p2p-dev-wlan0): P2P: WPA supplicant management interface changed to /fi/w1/wpa>
<warn> [1548688998.8282] device (p2p-dev-wlan0): remove_pending_action (0): 'waiting-for-supplicant' not pending
file src/devices/nm-device.c: line 14134 (nm_device_remove_pending_action): should not be reached
#0 0x00007f2c58dad1e5 n/a (libglib-2.0.so.0)
#1 0x00007f2c58dae51d g_logv (libglib-2.0.so.0)
#2 0x00007f2c58dae6f3 g_log (libglib-2.0.so.0)
#3 0x000055bd55246104 nm_device_remove_pending_action (NetworkManager)
#4 0x00007f2c487c4864 nm_device_p2p_wifi_set_mgmt_iface (libnm-device-plugin-wifi.so)
#5 0x00007f2c58e94c73 n/a (libgobject-2.0.so.0)
#6 0x000055bd55233112 constructor (NetworkManager)
#7 0x00007f2c58e94e8b n/a (libgobject-2.0.so.0)
#8 0x00007f2c58e96fde g_object_new_valist (libgobject-2.0.so.0)
#9 0x00007f2c58e9733d g_object_new (libgobject-2.0.so.0)
#10 0x00007f2c487c4a65 nm_device_p2p_wifi_new (libnm-device-plugin-wifi.so)
#11 0x00007f2c487c6655 recheck_p2p_availability (libnm-device-plugin-wifi.so)
#12 0x00007f2c487c9119 supplicant_iface_state_cb (libnm-device-plugin-wifi.so)
#13 0x00007f2c58525ace ffi_call_unix64 (libffi.so.6)
#14 0x00007f2c5852548f ffi_call (libffi.so.6)
#15 0x00007f2c58e903a6 g_cclosure_marshal_generic_va (libgobject-2.0.so.0)
#16 0x00007f2c58e8f636 n/a (libgobject-2.0.so.0)
#17 0x00007f2c58eabb01 g_signal_emit_valist (libgobject-2.0.so.0)
Fixes: 00e64d13320f5848a757765c8541e8160aa8e3e2
|
|\
| |
| |
| | |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/70
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
As the comment above the union says, structs in the union must have
the same layout of arp_ping. 'vlanid' is in the wrong place and breaks
that.
Fixes: f44c793f6cd89c3e84e83872478daf286821ed64
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/110
|
|\
| |
| |
| | |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/24
|
| | |
|