Agents are expected to save any new/updated secrets returned to
NetworkManager from a GetSecrets call, as it would be silly to return
those same secrets right back to the agent via SaveSecrets when the
agent is perfectly capable of saving the secrets itself without
round-tripping to NetworkManager and back.
We want to free the element data, then remove the element from the
list. Instead the code freed the element data, then treated the
element data pointer as a GSList link, which is completely wrong.
Settings with all-default values are not written to reduce
complexity of the keyfile (and be more human-readable friendly)
and that includes VLAN settings with a VLAN ID of zero. So
when reading this file back, if there is no 'base type' setting
(eg, the setting specified by the connection::type property)
then just add that setting. nm_connection_verify() will catch
cases where an empty 'base type' setting is invalid.
The code to check if an ethernet device had a matching connection was
not taking NMSettingConnection:interface-name into account, meaning it
might think a device had a matching connection when that connection
actually only matched a different device.
Fix this by calling nm_setting_connection_get_interface_name() rather
than nm_connection_get_virtual_iface_name() (which would always be
NULL for ethernet connections anyway).
Also, simplify the code a bit.
https://bugzilla.gnome.org/show_bug.cgi?id=696722
Add these aliases for the setting names '802-3-ethernet',
'802-11-wireless', and '802-11-wireless-security' and write them by
default. It's much friendlier for administrators to type, and a lot
less ugly.
Also works for:
[connection]
type=ethernet
The TRUE return got missed in the original commit of the AvailableConnections
code. _try_add_available_connection() returns TRUE if the connection was
added and FALSE if it wasn't, to allow the caller to optionally emit the
PropertiesChanged signal. Only TRUE was never returned...
The private reference to the NMDBusManager is created at
NMModemManager init time, and should only be cleared when the
NMModemManager is disposed. Instead it was getting cleared
whenever ModemManager1 was seen on the bus, and thus was unavailable
later when it was required to watch for the old ModemManager.
This caused NetworkManager to print warnings about NULL object
access to the console, and could prevent it from noticing when
ModemManager appeared on the system bus.
Extend nm-platform to support IPv4 and IPv6 route management.
Route features:
* Retrieve the list of IPv4 and IPv6 routes
* Add/delete/lookup IPv4 and IPv6 routes
* Flush all non-linklocal routes
Extend nm-platform to support IPv4 and IPv6 address management.
Address features:
* Retrieve the list of IPv4 and IPv6 addresses
* Add/delete/lookup IPv4 and IPv6 addresses
* Flush all non-linklocal addresses
Create the new nm-platform framework and implement link (or interface)
management. The nm-platform serves as the point of contact between
the rest of NetworkManager and the operating system.
There are two backends for nm-platform:
* NMFakePlatform: Fake kernel backend for testing purposes
* NMLinuxPlatform: Linux kernel backend for actual use
A comprehensive testsuite is included and will be extended with new
feature additions. To enable the Linux part of the testsuite, use
--enable-tests=root configure options and run 'make check' as root.
Use --enable-code-coverage for code coverage support.
./autogen.sh --enable-tests=root --enable-code-coverage
make
make -C src/platform check-code-coverage
Link features:
* Retrieve the list of links
* Translate between indexes and names
* Discover device type
* Add/remove dummy interfaces (for testing)
Thanks to Thomas Graf for helping with libnl3 synchronization issues.
We will very likely get the result of the connection attempt before the 2 mins,
either successful or error, but still we need to explicitly ask to keep the
DBus call open enough time.
This time should be enough to handle both the connection time (usually around
60s max), plus the time needed to register in the network and all the other
Simple.Connect() steps.
nmcli general logging [level <log level>] [domains <log domains>]
Examples:
nmcli general logging - print current level and domains values
nmcli general logging level ERR - change logging level to ERR
nmcli general logging level DEBUG domains DNS - change logging level to DEBUG and domains to DNS
nmcli g l domains DEFAULT - set default log domains (the ones active when NM)
They basically contain operations previously available via 'nmcli nm'.
'nmcli nm' is still kept for backward compatibility.
Usage:
nmcli switch [all|networking|wifi|wwan|wimax [on/off]]
nmcli general [status|permissions]
Examples:
nmcli switch all - show all switches
nmcli switch wifi off - switch Wi-Fi off
nmcli g s - show NM status
nmcli g p - show NM permissions
Examples:
nmcli device show - shows details for all available devices
nmcli device show eth0 - shows details for eth0
nmcli device show em1.25 - shows details for em1.25 VLAN device
This requests NetworkManager to perform scanning for Wi-Fi networks.
NetworkManager scans periodically, but this command can be used by impatient
users who don't want to wait for the next scan.
Direct D-Bus API call example:
gdbus call --system -d org.freedesktop.NetworkManager \
-o /org/freedesktop/NetworkManager/Devices/2 \
-m org.freedesktop.NetworkManager.Device.Wireless.RequestScan {}