| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
This will make it easier to dynamically add more options.
|
| |
| |
| |
| |
| |
| | |
We need this for a little little longer :(
This reverts commit 1de8383ad9fdfc8f552117e5d109bdfa7005634b.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we don't have explicit_bzero(), try a bit harder and use
a volatile pointer.
This is also what libsecret's egg_secure_clear() does [1]. However, for
us this is less important, because commonly we expect glibc to provide
a useable explicit_bzero().
[1] https://gitlab.gnome.org/GNOME/libsecret/blob/b5442654d483e959ac9ecd3a3fb9eebc8d9d8399/egg/egg-secure-memory.c#L1352
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a device is removed (like when the user unplugs a usb network
device) the device object is removed, so it doesn't emit a notify signal
for a change in its connectivity and so, device_connectivity_changed
is not called. This means that nobody updates the global connectivity
value which is potentially wrong if the device was the one providing
network connectivity.
Since device_connectivity_changed's first two parameters aren't actually
used and are there just for the signal to be able to be connected, I
moved the code from device_connectivity_changed to a new
update_connectivity_value function that just takes a NMManager
parameter and also call it from remove_device.
[thaller@redhat.com: fix coding style regarding whitespace]
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/141
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/101
|
| |
| |
| |
| |
| |
| |
| | |
* Fixed translation errors.
* Completed untranslated strings.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/102
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: 6aa66426a416 ('settings/ifupdown: merge eni_ifaces and connections hashes in plugin')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/145
https://bugzilla.redhat.com/show_bug.cgi?id=1694912
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When nmcli needs secrets for a connection it asks them for every known
setting. nmtui is a bit smarter and asks them only for settings that
actually exist in the connection. Make a step further and let clients
ask secrets only for setting that exist *and* have any secret
property. This decreases the number of D-Bus calls when editing or
showing a connection with secrets.
https://bugzilla.redhat.com/show_bug.cgi?id=1506536
https://github.com/NetworkManager/NetworkManager/pull/327
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Call the correct _finish() function for
nm_client_add_and_activate_connection_async(). add_and_activate_cb()
somewhat confusingly alternates between two different ones depending on
whether info->create is set.
Fixes: 35932375272a ('cli: reuse connections in nmcli dev wifi con')
https://github.com/NetworkManager/NetworkManager/pull/326
|
| |
| |
| |
| | |
Fixes: 7fb23b0a62a0 ('libnm: add NMIPRoutingRule API')
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The 4th argument of AC_SEARCH_LIBS is a list of additional libraries,
not the name of the variable to hold the result which is always
ac_cv_search_$function. Also, we should ignore the result when it is
"none required".
Fixes: 1f2eeb85d80d ('build: rename $(LIBDL) to $(DL_LIBS) and modify detection')
|
| |
| |
| |
| |
| | |
../libnm-core/nm-utils.c:6784:30: error: unused variable 'var_unref' [-Werror,-Wunused-variable]
gs_unref_variant GVariant *var_unref = vlan_var;
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
removed
Go straight to unmanaged. That's what all the other devices do when
their backing resources vanish. If the device reached disconnected
state, an autoconnect check would try to connect it back, in vain.
https://github.com/NetworkManager/NetworkManager/pull/324
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Open vSwitch is the special kid on the block -- it likes to be in charge of
the link lifetime and so we shouldn't be. This means that we shouldn't be
attempting to remove the link: we'd just (gracefully) fail anyways.
More importantly, this also means that we shouldn't care if we see the link
go away. Once the device reaches DISCONNECTED state, its configuration is
cleaned up and we may already be activating another connection. We shouldn't
alter the device state when OpenVSwitch decides to drop the old link.
https://bugzilla.redhat.com/show_bug.cgi?id=1543557
https://github.com/NetworkManager/NetworkManager/pull/324
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes a crash on failed AddAndActivate:
$ ip link set eth0 down
$ nmcli d conn eth0
Error: Failed to add/activate new connection: Connection 'eth0' is not available on device eth0 because device has no carrier
<NetworkManager crashes>
#3 0x000055555558b6c5 in _nm_g_return_if_fail_warning
#4 0x00005555557008c7 in nm_settings_has_connection
#5 0x0000555555700e5f in pk_add_cb
#6 0x0000555555726e30 in pk_call_cb
#7 0x0000555555726e30 in pk_call_cb
#8 0x0000555555726e30 in pk_call_cb
#9 0x00005555555aaea8 in _call_id_invoke_callback
#10 0x00005555555ab2e8 in _call_on_idle
https://github.com/NetworkManager/NetworkManager/pull/325
|
|\ \
| | |
| | |
| | | |
https://github.com/NetworkManager/NetworkManager/pull/321
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
initscripts support rule-* and rule6-* files for that.
Up until now, we ignored these files for the most part, except if
a user configured such files, the profile could not contain any static
routes (or specify a route-table setting). This also worked together
with the dispatcher script "examples/dispatcher/10-ifcfg-rh-routes.sh".
We cannot now start taking over that file format for rules. It might
break existing setups, because we can never fully understand all rules as
they are understood by iproute2. Also, if a user has a rule/rule6 file and
uses NetworkManager successfully today, then clearly there is a script
in place to make that work. We must not break that when adding rules
support.
Hence, store routing rules as numbered "ROUTING_RULE_#" and
"ROUTING_RULE6_#" keys.
Note that we use different keys for IPv4 and IPv6. The main reason is
that the string format is mostly compatible with iproute2. That means,
you can take the value and pass it to `ip rule add`.
However, `ip rule add` only accepts IPv4 rules. For IPv6 rules, the user
needs to call `ip -6 rule add`. If we would use the same key for IPv4
and IPv6, then it would be hard to write a script to do this.
Also, nm_ip_routing_rule_from_string() does take the address family as
hint in this case. This makes
ROUTING_RULE_1="pref 1"
ROUTING_RULE6_1="pref 1"
automatically determine that address families. Otherwise, such
abbreviated forms would be not valid.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add NMIPRoutingRule API with a few basic rule properties. More
properties will be added later as we want to support them.
Also, add to/from functions for string/GVariant representations.
These will be needed to persist/load/exchange rules.
The to-string format follows the `ip rule add` syntax, with the aim
to be partially compatible. Full compatibility is not possible though,
for various reasons (see code comment).
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
properties
|
| | | |
|
| | |
| | |
| | |
| | | |
Will be used for routing rules as well.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
No difference in practice, because kernel will ignore the table field
is FRA_TABLE attribute is present.
|
| | |
| | |
| | |
| | | |
Fixes: b8398b9e7948 ('platform: add NMPRulesManager for syncing routing rules')
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
I find it questionable, how nmcli likes to coerce the empty input to
NULL to indicate resetting the value. If nmcli would like to set a
default, it should use a different way of signalling that. Anyway, the
assertion was too strict.
$ nmcli connection modify "$PROFILE" +ipv4.addresses ''
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds new TLV types to the D-Bus and libnm API.
nmcli will be updated later to support those TLVs.
https://bugzilla.redhat.com/show_bug.cgi?id=1652211
https://github.com/NetworkManager/NetworkManager/pull/287
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
At a few places we checked whether neighbor->attrs was non-NULL.
That is not necessary, unless we'd like to catch some dangling/invalid
pointers. The attrs hash is always set otherwise.
Instead of just dropping the check, add a NM_IS_LLDP_NEIGHBOR() macro
(inline function).
|
| | |
| | |
| | |
| | |
| | | |
Explicitly check for LLDP_ATTR_TYPE_NONE. That's the only one we expect,
and the compiler can warn about missing switch cases for enums.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's called NM_MORE_ASSERTS not WITH_MORE_ASSERTS.
Also, NM_MORE_ASSERTS is always enabled. It's wrong to check whether it
is defined.
Fixes: e1e428b21e56cad3c50419e3fe2806dbbb21c976
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For one, just reassigning copy->attrs leaks the previous
hash table. Fix that.
Also, NMLldpNeighbor instances are not immutable. I think that
is an uglyness, and it would be preferable that they can be sealed.
A sealed object could safely share/ref the internal hash-table. However,
as it is, we cannot just have two NMLldpNeighbor instances share the
same hash-table. Do a full copy.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add support for IEEE 802.3 organizationally specific TLVs:
- MAC/PHY configuration/status (IEEE 802.1AB-2009 clause F.2)
- power via medium dependent interface (clause F.3)
- maximum frame size (clause F.4)
|
| | |
| | |
| | |
| | |
| | | |
As done for VLANs, add a new 'ppvids' attribute that reports all 'port
and protocol VLAN ID' TLVs for the neighbor.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously we exported the contents of VLAN Name TLV in the 'vid'
(uint32) and 'vlan-name' (string) attributes. This is not entirely
correct as the TLV can appear multiple times.
We need a way to export all the VLAN IDs and names for the
neighbor. Add a new 'vlans' attribute which obsoletes the other two
and is an array of dictionaries, where each dictionary contains the
'vid' and 'name' keys.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Support the management address TLV (IEEE 802.1AB-2009 clause
8.5.9). The TLV can appear multiple times and so it is exported on
D-Bus as an array of dictionaries.
|
| | |
| | |
| | |
| | |
| | | |
The function provides access to the GVariant representing a LLDP
attribute.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add the const qualifier to the attribute name in LLDP API functions so
that const strings and string literals are accepted. This change is
backwards compatible for existing users of the API.
|
| | | |
|
| | |
| | |
| | |
| | | |
Check the result of 'nmcli device lldp' command.
|
|/ /
| |
| |
| | |
Use unaligned access functions instead where needed.
|
| |
| |
| |
| |
| |
| | |
The error was leaked when cancelled.
Fixes: 818023c257ca ('dns/resolved: add systemd-resolved backend')
|
|\ \
| | |
| | |
| | |
| | | |
https://github.com/NetworkManager/NetworkManager/pull/322
https://bugzilla.redhat.com/show_bug.cgi?id=1652910
|