Thomas Haller
0f22f77b1c
shared: support stripping whitespace from nm_utils_buf_utf8safe_unescape()
...
When parsing user input if is often convenient to allow stripping whitespace.
Especially with escaped strings, the user could still escape the whitespace,
if the space should be taken literally.
Add support for that to nm_utils_buf_utf8safe_unescape().
Note that this is not the same as calling g_strstrip() before/after
unescape. That is, because nm_utils_buf_utf8safe_unescape() correctly
preserves escaped whitespace. If you call g_strstrip() before/after
the unescape, you don't know whether the whitespace is escaped.
2020-05-13 10:28:04 +02:00
Antonio Cardace
b0240db068
ethtool: add coalesce settings
...
This is the initial support for coalesce settings and only allows
getting/setting, nothing is yet implemented in nm-device.
Also add unit test.
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-13 10:15:23 +02:00
Thomas Haller
755c3af915
libnm: add comment and assertions for handling gendata based setting in init_from_dbus()
2020-05-11 18:50:37 +02:00
Thomas Haller
2929392855
all: use "int/char" instead of "gint/gchar" typedefs
...
This is also recommended by our checkpatch.pl script.
2020-05-08 12:56:29 +02:00
Thomas Haller
4101894466
libnm: use nm_str_is_empty() in "nm-setting-match.c"
2020-05-08 11:11:43 +02:00
Thomas Haller
42288df043
libnm: adjust bridge defines NM_BRIDGE_VLAN_DEFAULT_PVID_DEF
2020-05-08 08:02:51 +02:00
Thomas Haller
bfcfdc2955
libnm: adjust bridge defines NM_BRIDGE_VLAN_STATS_ENABLED_DEF
2020-05-08 08:02:51 +02:00
Thomas Haller
f34144f70b
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_*
2020-05-08 08:02:51 +02:00
Thomas Haller
55311c6a6a
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_STARTUP_QUERY_COUNT_*
2020-05-08 08:02:51 +02:00
Thomas Haller
433bb1fbe4
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_SNOOPING_DEF
2020-05-08 08:02:50 +02:00
Thomas Haller
96bb90a1ef
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEF
2020-05-08 08:02:50 +02:00
Thomas Haller
0db1d28e6d
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_RESPONSE_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
58001f70e8
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
08cfe812ec
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERIER_DEF
2020-05-08 08:02:50 +02:00
Thomas Haller
da6bbd73aa
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERIER_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
a75ec12d8b
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
ec9e58ee01
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_*
2020-05-08 08:02:50 +02:00
Thomas Haller
769b176263
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_COUNT_*
2020-05-08 08:02:50 +02:00
Thomas Haller
4c3691e52e
libnm: adjust bridge defines NM_BRIDGE_PORT_PATH_COST_*
2020-05-08 08:02:49 +02:00
Thomas Haller
a7421f8bf2
libnm: adjust bridge defines NM_BRIDGE_PORT_PRIORITY_*
2020-05-08 08:02:49 +02:00
Thomas Haller
a690cedcba
libnm: adjust bridge defines NM_BRIDGE_PRIORITY_*
2020-05-08 08:02:49 +02:00
Thomas Haller
e2cb0837cc
libnm: adjust bridge defines NM_BRIDGE_MAX_AGE_*
2020-05-08 08:02:49 +02:00
Thomas Haller
d7dd4c70d0
libnm: adjust bridge defines NM_BRIDGE_HELLO_TIME_*
2020-05-08 08:02:49 +02:00
Thomas Haller
696fae40b7
libnm: adjust bridge defines NM_BRIDGE_STP_DEF
2020-05-08 08:02:49 +02:00
Thomas Haller
8ee4dbf709
libnm: adjust bridge defines NM_BRIDGE_FORWARD_DELAY_*
2020-05-08 08:02:49 +02:00
Thomas Haller
f61e354cfa
libnm: adjust bridge defines NM_BRIDGE_AGEING_TIME_*
2020-05-08 08:02:48 +02:00
Thomas Haller
f5527ecc5a
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_HASH_MAX_*
2020-05-08 08:02:48 +02:00
Thomas Haller
adf377c2c0
libnm: move defines for bridge defaults to "nm-core-internal.h" header
2020-05-08 08:02:48 +02:00
Beniamino Galvani
966e3341a6
libnm-core: replace malloc() with g_malloc()
...
For consistency with the rest of the code, prefer g_malloc() over
malloc().
2020-05-07 10:01:54 +02:00
Thomas Haller
0ba444a084
libnm: allocate device and kernel_command_line arrays in NMSettingMatch lazy
2020-05-06 15:39:14 +02:00
Thomas Haller
7939c8e770
libnm: allocate interface_name array in NMSettingMatch lazy
...
Also track the interface_name in a GArray so that
nm_setting_match_get_interface_names() returns a NULL
terminated strv array.
2020-05-06 15:39:08 +02:00
Thomas Haller
ef16dcaee4
libnm: cleanup NMSettingMatch.verify()
2020-05-06 15:19:22 +02:00
Thomas Haller
eaf3862075
libnm: fix gtk-doc annotations for nm_setting_match_get_{kernel_command_lines,drivers}()
...
Otherwise the function is not usable via generated bindings.
2020-05-06 15:07:09 +02:00
Adrian Freihofer
214b31dcbc
settings: add match for driver
...
Add a new "driver" match option to nm-settings. It allows to disable a
network connection configuration if a pattern is found or is not found
in the device driver name.
2020-05-06 15:05:21 +02:00
Adrian Freihofer
3a8e46f2a5
settings: add match for proc cmdline
...
Add a new "kernel-command-line" match option to nm-settings. It allows
to disable a network connection configuration if a pattern is found or
is not found in /proc/cmdline.
2020-05-06 15:05:20 +02:00
Adrian Freihofer
b42c3aa97a
settings: add match verify function
2020-05-06 15:05:20 +02:00
Thomas Haller
180cda7632
libnm: fix gtk-doc annotations for nm_setting_match_get_interface_names()
...
Otherwise the function is not usable via generated bindings.
Fixes: 9b9dce9486 ('all: add 'match' setting')
2020-05-06 15:01:06 +02:00
Antonio Cardace
05d9381060
nm-setting-bridge: add 'multicast-startup-query-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:01 +02:00
Antonio Cardace
abe660f780
nm-setting-bridge: add 'multicast-startup-query-count' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
62facc59e8
nm-setting-bridge: add 'multicast-query-response-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
9842c55503
nm-setting-bridge: add 'multicast-query-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
b9b9a95395
nm-setting-bridge: add 'multicast-querier-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
c1bc1570f3
nm-setting-bridge: add 'multicast-membership-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
1c437090ff
nm-setting-bridge: add 'multicast-last-member-interval' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
c49f20887a
nm-setting-bridge: add 'multicast-last-member-count' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:33:00 +02:00
Antonio Cardace
673d51bd5c
nm-setting-bridge: add 'multicast-hash-max' bridge option
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:32:59 +02:00
Antonio Cardace
8e945c8967
nm-setting-bridge: add missing 'Since: X.Y' comments to options
...
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
2020-05-04 17:32:52 +02:00
Thomas Haller
d4615e73ed
libnm: avoid compiler warning about uninitalized variable in nm_setting_bridge_port_remove_vlan_by_vid()
...
With LTO, compiler warns:
libnm-core/nm-setting-bridge-port.c: In function nm_setting_bridge_port_remove_vlan_by_vid:
libnm-core/nm-setting-bridge-port.c:252:6: error: v_start may be used uninitialized in this function [-Werror=maybe-uninitialized]
252 | if (v_start == vid_start && v_end == vid_end) {
| ^
libnm-core/nm-setting-bridge-port.c:239:10: note: v_start was declared here
239 | guint16 v_start, v_end;
| ^
libnm-core/nm-setting-bridge-port.c:252:28: error: v_end may be used uninitialized in this function [-Werror=maybe-uninitialized]
252 | if (v_start == vid_start && v_end == vid_end) {
| ^
libnm-core/nm-setting-bridge-port.c:239:19: note: v_end was declared here
239 | guint16 v_start, v_end;
| ^
Avoid the (false positive) warning.
2020-05-03 11:01:56 +02:00
Thomas Haller
9b295f0df5
dhcp: make connection.mud-url configurable as global connection default
...
Conceptionally, the MUD URL really depends on the device, and not so
much the connection profile. That is, when you have a specific IoT
device, then this device probably should use the same MUD URL for all
profiles (at least by default).
We already have a mechanism for that: global connection defaults. Use
that. This allows a vendor drop pre-install a file
"/usr/lib/NetworkManager/conf.d/10-mud-url.conf" with
[connection-10-mud-url]
connection.mud-url=https://example.com
Note that we introduce the special "connection.mud-url" value "none", to
indicate not to use a MUD URL (but also not to consult the global connection
default).
2020-04-28 13:01:18 +02:00
Thomas Haller
552aa962d7
libnm,dhcp: use nm_clear_g_free() instead of nm_clear_pointer(, g_free)
2020-04-27 12:54:14 +02:00