| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| | |
By default the find will run for 30s. This can be increased or decreased
in the range of 1-600s by setting "Timeout" in the options parameter.
|
| | |
|
| |
| |
| |
| |
| | |
This adds the introspection data and P2P peer handling to libnm. To be
usable the P2P device handling is also needed.
|
| |
| |
| |
| |
| | |
If a wifi device supports P2P mode, then create a further P2P device for
it automatically.
|
| |
| |
| |
| | |
This only adds the new device type and simple peer list handling.
|
|/
|
|
|
| |
The support is rather basic and only allows connecting to a specific
peer. However, this is actually already enough for many usecases.
|
|
|
|
|
|
|
|
|
| |
Discovered by GCC 9:
src/ppp/nm-ppp-manager.c: In function ‘_ppp_manager_start’:
./src/nm-logging.h:59:9: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
Fixes: 35d9169c3c4a0361c363eca8a34ed6c575a620f1
|
| |
|
| |
|
|
|
|
| |
Fixes: d81e10942fda8b6cb163fc1d631cd44eb35e3b91
|
|
|
|
| |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/64
|
|\
| |
| |
| |
| | |
Update Ukrainian translation
See merge request NetworkManager/NetworkManager!66
|
|/ |
|
|
|
|
| |
https://github.com/NetworkManager/NetworkManager/pull/289
|
| |
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/282
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are two callers that are concerned with disconnecting/releasing a
setting:
- _setting_release_hfr() (formerly _setting_release())
- _nm_connection_add_setting() for the @s_old setting
Compared to one caller that connects/adds a setting (_nm_connection_add_setting()).
Refactor the two callers to use the same helper function
(_setting_release()) so that the implementation of how to release a
setting is at one place.
This patch was originally done when adding another signal to NMSetting.
That did not happen (yet), but the refactoring still makes sense.
|
| |
| |
| |
| |
| |
| | |
Seems we didn't actually unregister the signal handlers. Ups.
Fixes: dfba4ce1e1c5bd0c1ae798bc538b5fab3e3faded
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
And merge it with the version that uses no flags.
Previously, clear_secrets(_with_flags()) was only implemented
by NMSettingVpn. All other settings would only consider GObject-based
properties.
As we will add secrets that have no GObject property, call the virtual
function always, so that the setting can hook into this (for WireGuard
peers).
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The secret name should be the one that we can pass to nm_setting_get_secret_flags().
It's wrong to call the function repeatedly with secret-name "secrets".
Probably nobody cared anyway about the name. nm_connection_clear_secrets_with_func()
is used to clear secrets based on the flags, not the secret-name.
Fixes: 2b2404bbef00abf247f1246e146fc873a90a5265
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a hook so that we can overwrite the property info.
Yes, this is an API/ABI change for NMSettingClass, which is in a
header file. But this is not API that we want to support. Users must
not use this. Alternatively, I could hook the callback into
NMSettInfoSetting, but either works.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The caller may not wish to replace existing peers, but only update/add
the peers explicitly passed to nm_platform_link_wireguard_change().
I think that is in particular interesting, because for the most part
NetworkManager will configure the same set of peers over and over again
(whenever we resolve the DNS name of an IP endpoint of the WireGuard
peer).
At that point, it seems disruptive to drop all peers and re-add them
again. Setting @replace_peers to %FALSE allows to only update/add.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We still don't use getnameinfo(). This is used for logging,
where we want to see a string representation that is as close
as possible to the actual bytes (to spot differences). It should
not be obfuscated by a libc function out of our control.
Also fix the notation for the IPv6 scope ID to use the common '%'
character.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add cmp/hash functions that correctly honor the well known fields, instead
of doing memcmp/memcpy of the entire sockaddr structure.
Also, move the set function to nm_sock_addr_union_cpy() and
nm_sock_addr_union_cpy_untrusted(). This also gets it right
to ensure all bytes of the union are initialized (to zero).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
NMIPAddr is a union of IPv4 and IPv6 addresses.
A lot of our internal API handles IPv4 as in_addr_t / guint32 / be32_t
types, as such the union field "addr4" is just a plain number. Possibly
the internal API should be all refactored to prefer "struct in_addr"
instead, but that is yet to be done.
Anyway, at a few places we will need also access to the IPv4 address in form of
a `struct in_addr`. Add an alias for that.
I am not too happy about the resulting naming. It would be nicer to have
struct in_addr addr4;
struct in6_addr addr6;
in_addr_t s_addr4;
but for now, don't do such renaming.
|
|/
|
|
|
| |
The compiler is too smart for nm_strndup_a(). The code is correct,
suppress "-Wstringop-truncation" warning.
|
|
|
|
| |
Fixes: fbb038af5e5d675c994de26da676edfd8e73ffbe
|
|
|
|
|
|
|
|
|
| |
Upsets clang:
libnm-core/nm-setting-ip-config.c:2688:43: error: unused variable 'setting_class' [-Werror,-Wunused-variable]
nm_auto_unref_gtypeclass NMSettingClass *setting_class = g_type_class_ref (NM_TYPE_SETTING_IP_CONFIG);
Fixes: a3d6976efcb0b05fe304643c466df12b5ee56f9d
|
| |
|
|
|
|
|
|
|
| |
The ip=dhcp (without a device name given) and such should activate all
possible devices.
https://github.com/NetworkManager/NetworkManager/pull/284
|
|
|
|
|
|
|
|
| |
When the supplicant does not support PMF we wrongly set
'ieee80211w=0', but since the option is not recognized the connection
fails. Don't set it when unsupported.
Fixes: a9ab50efb10dfb50cfe897c58afa300f8b07f6ba
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a test error, which aims to convert "unsigned long int" type,
but the generic type may not have been covered.
Don't select based on the gint32-like typedefs, but on the basic C
integer types.
Fixes: 8c2d58b23746babf021e546449ea7b1c7549f6ba
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/108
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/279
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Order the code in our common way. No other changes.
- ensure to include the main header first (directly after
"nm-default.h").
- reorder function definitions: get_property(), set_property(),
*_init(), *_new(), finalize(), *_class_init().
|
| |
| |
| |
| |
| |
| |
| | |
Unify the coding style for class-init functions in libnm-core.
Also make use of obj_properties, NM_GOBJECT_PROPERTIES_DEFINE(), and
_notify().
|
|/
|
|
| |
Fixes: 7f63c875f973f3b7cc136130c61348b36e280ab6
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/278
|
| | |
|
| |
| |
| |
| |
| | |
Add a compile time check that the buffer that we allocate on the stack
is reasonably small.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
NM_UTILS_LOOKUP_STR() uses alloca(). Partly to avoid the overhead of
malloc(), but more important because it's convenient to use. It does
not require to declare a varible to manage the lifetime of the heap
allocation.
It's quite safe, because the stack allocation is of a fixed size of only
a few bytes. Overall, I think the convenience that we get (resulting in
simpler code) outweighs the danger of stack allocation in this case. It's
still worth it.
However, as it uses alloca(), it still must not be used inside a (unbound)
loop and it is obviously a macro.
Rename the macros to have a _A() suffix. This should make the
peculiarities more apparent.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The only purpose of using alloca() to avoid the overhead of heap-allocation
and possible save a line in source code for managing/freeing the heap allocation.
For tests we don't care about performance, and (in this case)
the code does not get any shorter.
Avoid alloca() in tests, because alloca() is something to search for
when reviewing code for stack overflows. No need to have such false
positives show up in tests.
|
|
|
|
|
|
| |
Add a version of nm_utils_strbuf_append_*() that does not care
about NUL terminate strings, but accept any binary data. That makes
it useful for writing a binary buffer.
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/275
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a "a{sv}" output argument to "AddAndActivate2" D-Bus API.
"AddAndActivate2" replaces "AddAndActivate" with more options.
It also has a dictionary argument to be forward compatible so that we
hopefully won't need an "AddAndActivate3". However, it lacked a similar
output dictionary. Add it for future extensibility. I think this is
really to workaround a shortcoming of D-Bus, which does provide strong
typing and type information about its API, but does not allow to extend
an existing API in a backward compatible manner. So we either resort to
Method(), Method2(), Method3() variants, or a catch-all variant with a
generic "a{sv}" input/output argument.
In libnm, rename "nm_client_add_and_activate_connection_options()" to
"nm_client_add_and_activate_connection2()". I think libnm API should have
an obvious correspondence with D-Bus API. Or stated differently, if
"AddAndActivateOptions" would be a better name, then the D-Bus API should
be renamed. We should prefer one name over the other, but regardless
of which is preferred, the naming for D-Bus and libnm API should
correspond.
In this case, I do think that AddAndActivate2() is a better name than
AddAndActivateOptions(). Hence I rename the libnm API.
Also, unless necessary, let libnm still call "AddAndActivate" instead of
"AddAndActivate2". Our backward compatibility works the way that libnm
requires a server version at least as new as itself. As such, libnm
theoretically could assume that server version is new enough to support
"AddAndActivate2" and could always use the more powerful variant.
However, we don't need to break compatibility intentionally and for
little gain. Here, it's easy to let libnm also handle old server API, by
continuing to use "AddAndActivate" for nm_client_add_and_activate_connection().
Note that during package update, we don't restart the currently running
NetworkManager instance. In such a scenario, it can easily happen that
nmcli/libnm is newer than the server version. Let's try a bit harder
to not break that.
Changes as discussed in [1].
[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/37#note_79876
|
| |
| |
| |
| |
| |
| |
| | |
Don't return success from a nested code path. Handle all errors
first, and return early. Well, we cannot really return right away
because we need to handle the failure. So, at least, check for errors
and "goto fail".
|
|/
|
|
| |
Akin to nm_g_object_ref() and nm_g_object_unref().
|