Commit Graph

8762 Commits

Author SHA1 Message Date
Dan Williams
06b0fc7b64 ifcfg-rh: clean up certificate/key verification tests
Kill the CKType enum since we can figure out what we want
from the property name.
2013-07-26 16:23:23 -05:00
Dan Williams
bad980ccfa ifcfg-rh: simplify testcases #1
Use g_assert() macros where we can, and don't bother passing stuff
into connection_from_file() that we don't even look at.
2013-07-26 16:23:23 -05:00
Dan Williams
01f172e99e ifcfg-rh: don't require all arguments to connection_from_file()
Lets eg testcases pass NULL instead of a bunch of variables they
just throw away.
2013-07-26 16:23:23 -05:00
Dan Williams
4920330ae5 ifcfg-rh: cleanup connection_from_file() error handling
Don't bother with local error variables, just pass 'error' around.
2013-07-26 16:23:22 -05:00
Dan Williams
c2ad294290 ifcfg-rh: fix error handing in some functions that expect error != NULL
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.
2013-07-26 16:23:22 -05:00
Pavel Šimerda
af02dc0d5e git: mark relative paths properly
May need further adjustments when built with different configuration.
2013-07-26 22:45:15 +02:00
Pavel Šimerda
f121995fad platform: add support for address lifetimes 2013-07-26 22:45:15 +02:00
Pavel Šimerda
aca9b9b570 platform: fix udev/kernel interface race conditions
A network interface is only exposed if it's recognized by both netlink
cache and udev.
2013-07-26 21:14:08 +02:00
Pavel Šimerda
423307f6bc platform: improve signal handling in tests 2013-07-26 21:10:27 +02:00
Pavel Šimerda
1c88de0488 platform: remove nm_platform_delete_device_by_name() 2013-07-26 21:10:27 +02:00
Pavel Šimerda
ad5b0a8e67 platform: more logging for tests 2013-07-26 21:10:27 +02:00
Pavel Šimerda
b38f76cdb4 build: use a helper script for all valgrind tests 2013-07-26 19:08:03 +02:00
Pavel Šimerda
7b2a4054b0 build: always use serial-tests 2013-07-26 18:16:18 +02:00
Pavel Šimerda
6d688f9c87 trivial: simplify a condition 2013-07-26 18:16:18 +02:00
Pavel Šimerda
e07383f3de core: implement nm_ip[46]_config_update_setting() 2013-07-26 01:07:24 +02:00
Pavel Šimerda
b2a207b44b trivial: rename existing to connection in add_device() 2013-07-25 21:23:27 +02:00
Jiří Klimeš
05258cba88 cli: fix reading p-key and parent options for 'con add type infiniband' 2013-07-25 15:01:03 +02:00
Dan Williams
ae319b922e build: fix distcheck configure flags
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.
2013-07-24 14:06:32 -05:00
Dan Williams
0744c6be08 build: simplify rdisc tests makefile subdirs
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.
2013-07-24 14:05:46 -05:00
Dan Williams
e63ecfa2fd Update libndp 2013-07-24 12:58:09 -05:00
Jack Bates
f9494db7c1 dnsmasq: does handle more than one nameserver per domain
dnsmasq should query per-domain nameservers non-deterministically in the
normal dnsmasq manner. Currently it queries them in order, the same way
as if --strict-order was set. Simon Kelley plans to correct this, but
either way, dnsmasq does handle more than one nameserver per domain.

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1003842/comments/58
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1003842/comments/55
2013-07-24 10:19:40 -05:00
Pavel Šimerda
7cc7a38288 platform: handle address/route deletion upon link actions (bgo #704770)
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
2013-07-24 09:49:03 -05:00
Jiří Klimeš
d60dae2558 keyfile: ignore Emacs interlocking link named .#<file_name> (rh #987629)
https://bugzilla.redhat.com/show_bug.cgi?id=987629
http://stackoverflow.com/questions/5738170/why-does-emacs-create-temporary-symbolic-links-for-modified-files
2013-07-24 12:32:18 +02:00
Pavel Šimerda
38a57b3497 platform: listen for route changes properly 2013-07-24 10:05:41 +02:00
Dan Winship
fe8275aa7e nm-online: fix indentation, etc 2013-07-23 09:07:39 -04:00
Dan Williams
fe5f0d2070 core: let device classes indicate their HW address will never change (bgo #701744)
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
2013-07-22 15:56:34 -05:00
Dan Williams
86a197f177 dhcp: add debug logging to config file merging 2013-07-22 14:28:48 -05:00
Dan Williams
1364ccb2c2 dhcp: also check for config files by UUID 2013-07-22 14:28:48 -05:00
Dan Williams
0f592b40c8 core: re-add assertions to NMIP[4|6]Config objects
They make any problems apparent at the source instead of later where
the problem must be more intesively debugged.
2013-07-22 14:28:48 -05:00
Dan Winship
17e91fd46a core: change the rules for ignore-carrier
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).
2013-07-22 11:30:21 -04:00
Colin Walters
841ca9bb84 server.conf: We're no longer a sample, reword introduction
Now we actually change configuration, explain that better.
2013-07-22 11:30:21 -04:00
Colin Walters
8e37935875 Merge some comments from server.conf into "man NetworkManager.conf"
The latter should have the full+canonical description, and the config
file comments should be very brief, and link to it for more info.
2013-07-22 11:30:21 -04:00
Colin Walters
31d1f288f5 server.conf: Remove dns=none example
This is covered in the manpage adequately, and we want this file to be
actual options now, not just commented out ones.
2013-07-22 11:30:21 -04:00
Dan Winship
328dea9c5c core: make monitor-connection-files be false by default 2013-07-22 11:30:21 -04:00
Jiří Klimeš
5f0f4b83b1 cli: add support for InfiniBand's 'p-key' and 'parent' to interactive editor 2013-07-22 14:43:39 +02:00
Jiří Klimeš
8bcc68a00b cli: trivial; use mtu variable instead of calling *_get_mtu() again 2013-07-22 14:07:07 +02:00
Jiří Klimeš
6993b5b2a1 man: add 'nmcli-examples' manual page with examples of nmcli usage
(and add a reference to 'nmcli-examples' to other man pages)
2013-07-22 13:43:54 +02:00
Jiří Klimeš
ed25c1a443 cli: load/save nmcli editor (readline) history so that it is persistent
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
2013-07-22 13:37:17 +02:00
Jiří Klimeš
5ee7f488e7 man: update nmcli manual page for 'connection modify' 2013-07-22 13:37:17 +02:00
Jiří Klimeš
34ab351284 cli: update bash-completion file for 'connection modify' 2013-07-22 13:37:17 +02:00
Dan Williams
16f5818927 cli: simplify setting creation 2013-07-22 13:37:17 +02:00
Jiří Klimeš
d4c8df4895 cli: 'connection modify' - modify a single property
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)
2013-07-22 13:37:17 +02:00
Jiří Klimeš
44debdf4ce man: update nmcli manual page for 'connection edit' 2013-07-22 13:37:17 +02:00
Jiří Klimeš
ead6d31eac cli: update bash-completion file for 'connection edit' 2013-07-22 13:37:16 +02:00
Jiří Klimeš
61d06d5db4 cli: use 'dirty' flag for "Do you really want to quit?" confirmation in editor 2013-07-22 13:37:16 +02:00
Jiří Klimeš
8bdb4f7a09 cli: libreadline (libedit) TAB-completion for 'connection edit'
TODO:
 - test with libedit (it seems to be a bit different, buggy?)
2013-07-22 13:37:16 +02:00
Jiří Klimeš
ca1c0cdaf4 cli: add 'nmcli' command for nmcli connection editor configuration
- show/hide status line:  nmcli> nmcli status-line yes | no
- editor prompt color:    nmcli> nmcli prompt-color <0-8>  (0 = normal/without color)
2013-07-22 13:37:16 +02:00
Jiří Klimeš
6f883c310e cli: fix saving connections in the connection editor
- 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.
2013-07-22 13:37:16 +02:00
Jiří Klimeš
07c92ec6e7 cli: insert text to line so that user can edit it
'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??
2013-07-22 13:37:16 +02:00
Jiří Klimeš
68d69bfce8 cli: add a submenu for connection editor for detail property handling
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
2013-07-22 13:37:16 +02:00