Commit Graph

15047 Commits

Author SHA1 Message Date
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
Jiří Klimeš
def37e4e0d cli: nmc_property_get_gvalue() nmc_property_set_gvalue()
Functions to
 - get property value and return it in GValue
 - set property value from GValue
2013-07-22 13:37:16 +02:00
Jiří Klimeš
f96cd68d90 cli: allow editing existing connections in interactive editor
So the syntax is now:
nmcli con edit [id | uuid | path ] <ID>
  - for editing an existing connection

nmcli con edit [type <new connection type>] [con-name <new connection name>]
  - for adding a new connection
2013-07-22 13:36:54 +02:00
Jiří Klimeš
da7cd4720c cli: line-editing capability for interactive editor using an edit line library
Supported libraries are:
GNU Readline    (libreadline) http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
NetBSD Editline (libedit)     http://www.thrysoee.dk/editline/

We load these symbols:
readline() - main function allowing getting user input and aditing that
add_history() - stores strings to history
rl_insert_text() - insert text into the line at the current cursor position
rl_startup_hook - hook to call just before readline prints the first prompt
2013-07-22 13:34:48 +02:00
Jiří Klimeš
937eb48590 cli: 'connection edit' - edit/add connections in an interactive editor
nmcli connection edit [type <type>] [con-name <name>]

Examples:
nmcli c e
nmcli c e type ethernet
nmcli c e type wifi con-name "My home Wi-Fi"
nmcli c e type bond
...
2013-07-22 13:32:32 +02:00
Pavel Šimerda
801434ce45 platform: don't remove default route in *_route_sync() 2013-07-22 13:03:46 +02:00
Pavel Šimerda
db46beaa2f core: fix NULL IPv6 gateway handling 2013-07-22 13:03:46 +02:00
Jiří Klimeš
72e65ef45c trivial: use capital "B" in InfiniBand 2013-07-22 10:34:38 +02:00
Jiří Klimeš
74d0fcb97b man: update/fix options for 'nmcli con add' in nmcli manual page 2013-07-22 10:30:07 +02:00
Jiří Klimeš
02ff69100b cli: fix 'arp-interval' and 'arp-ip-target' options in usage help 2013-07-22 09:58:52 +02:00
Christian Kirbach
c8456c6f66 po: updated German (de) translation (bgo #704598) 2013-07-22 09:55:15 +02:00
Pavel Šimerda
9ef294f007 trivial: remove nm-ip6-manager 2013-07-20 17:08:01 +02:00
Pavel Šimerda
bd1c7fbece device: use internal router discovery implementation 2013-07-20 17:08:01 +02:00
Pavel Šimerda
c3a4656a68 rdisc: libndp implementation 2013-07-20 16:50:18 +02:00
Pavel Šimerda
21a8a71d48 rdisc: abstract class and fake implementation
Abstract class, fake implementation and a manual testing tool for
NetworkManager's internal IPv6 router discovery module. When a real
implementation is ready, it will replace nm-ip6-manager and will be used
by nm-device.
2013-07-20 16:50:18 +02:00
Pavel Šimerda
74d8d374b3 trivial: remove unnecessary check
inet_ntop doesn't even have enough information to add the percent sign
and the device name.
2013-07-20 16:50:17 +02:00