A couple functions depended on the passed-in error being !NULL to
correctly report errors, and we can't depend on that because it might
not be true. So fix up those functions' call chain to ensure that
errors get reported regardless of whether 'error' is !NULL.
Update the tests flag to the latest syntax, and make sure we
don't run valgrind on distcheck for now, since new valgrind
errors may show up when things like glib change.
src/rdisc doesn't need a makefile just to point to the tests,
we can do that more easily from src/Makefile.am like we do for
all the other tests subdirs.
When link goes !IFF_UP by internal or external action, we need to delete
related routes from the route cache. The same is done for both addresses
and routes upon link removal.
https://bugzilla.gnome.org/show_bug.cgi?id=704770
Bluetooth device hardware addresses won't change during the lifetime
of the object (since that would mean a completely new device) and
they also won't have an ifindex because they aren't netdevices.
Various bits of the core periodically call nm_device_update_hw_address()
to update a device's hardware address, but this function expects that
any device with a hardware address also has an ifindex. Except that
Bluetooth devices don't because they aren't netdevices.
Modify the get_hw_address_length() function to return a boolean
indicating whether or not the address can ever change, and set that
for BT devices. nm_device_update_hw_address() then exits early if
there's no point in re-checking the hardware address, avoiding the
assertion.
https://bugzilla.gnome.org/show_bug.cgi?id=701744
The previous ignore-carrier rules did not work well with dynamic IP
(dhcp/slaac) connections. Change the rule so that only static IP
connections can be activated when carrier is not present (but both
static and dynamic connections will remain up when carrier is lost).
The history is saved to ~/.nmcli-history file, separately for each connection.
The file uses glib key-file format. Each group is a connection UUID, keys are
integer numbers (history entry order), and values are the actual commands.
Example ~/.nmcli-history file:
[0bdc9852-2540-4e12-a605-5e65a9483772]
0=help quit
1=print
2=nmcli prompt-color 3
3=help set
4=q
[9142680d-3b87-4feb-ab1e-19e8762329ad]
0=eth
1=set ipv4.addr 1.2.3.4
2=quit
nmcli connection modify [id | uuid | path] <ID> <setting>.<property> [<value>]
missing value means setting the default value (deleting).
Examples:
nmcli con mod ethernet-2 connection.autoconnect no
nmcli con mod "Home Wi-Fi" wifi.mtu 1350
nmcli con mod "T-Mobile 1" gsm.apn internet
nmcli con mod 91782692-512e-4408-9572-667887319ef4 conn.perm user:cimrman
TODO:
- allow modifying multiple properties (using single command)
- Main command loop was moved to run in a separate thread (using GThread).
Otherwise glib main loop would be blocked in processing D-Bus and other
events.
- Handle creating new vs. updating already saved connection.
'change' command puts current value on edit line, so that user can change
it and confirm with <Enter>.
Notes:
* it works for libreadline
* libedit has to be checked
* doesn't work without any edit-line library - how to do that??
property_edit_submenu() is the main function. It is entered from main menu by
'goto'
command.
Commands of this menu:
set - set new value to the property
add - add a value to the property (for non-container properties it is
the same as set)
change - allow editing the current property value
remove - remove the property value(s)
describe - show the property description and/or usage
print - show the property value
back - return to the setting level (main menu)
help - show help (command descriptions)
quit - quit nmcli