Commit Graph

8762 Commits

Author SHA1 Message Date
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
Pavel Šimerda
f7b2443035 core: always commit ip[46]-config to nm-platform
This is necessary to update the address lifetimes.
2013-07-20 15:30:09 +02:00
Pavel Šimerda
d8e6065f63 core: switch nm-ip4-config's NMIP[46]Address to NMPlatformIP[46]Address 2013-07-20 15:30:08 +02:00
Pavel Šimerda
74621a8f5c core: replace nm_ip[46]_config_diff()
Callers of these functions now only care whether two IP configs are
different and not what specific property changed, so we can simplify
this code down to a simple comparison for equality, based on the hashing
that's already done for the DNS manager.
2013-07-20 15:30:08 +02:00
Pavel Šimerda
a291448cf4 policy: don't use nm_ip[46]_config_diff()
nm-platform will cope with unnecessary configuration commits.
2013-07-20 15:30:08 +02:00
Dan Williams
89512ec5c4 build: allow dhcpcd versions higher than 5
No reason to exclude them, just that configure.ac hasn't tracked new
versions of dhcpcd.
2013-07-19 13:41:28 -05:00
Dan Williams
c370c04fee core: fix trailing semicolon that caused all IP6 configs never to get applied 2013-07-15 17:10:45 -05:00
Pavel Šimerda
d42f99f590 device: clean up ip6 configuration flow
IP6 configuration is now stored in ac_ip6_config and dhcp6_ip6_config
and passing them as function arguments is avoided. Written with Dan
Williams.
2013-07-15 15:53:43 +02:00
Jiří Klimeš
8de9bfcf7d examples: update 70-wifi-wired-exclusive.sh for new nmcli syntax 2013-07-15 15:52:23 +02:00
Enrico Nicoletto
9dd2c58e99 po: updated Brazilian Portuguese (pt_BR) translation (bgo #704210)
adds new message for nm-online
2013-07-15 15:42:21 +02:00
Christian Kirbach
170b35f591 po: updated German (de) translation (bgo #702920) 2013-07-15 10:05:07 +02:00
Shankar Prasad
c5a7b45642 po: updated Kannada (kn) translation (bgo #703586) 2013-07-15 09:56:20 +02:00
Enrico Nicoletto
08ce304c64 po: updated Brazilian Portuguese (pt_BR) translation (bgo #704210) 2013-07-15 09:03:59 +02:00
Dan Williams
d687492d49 ifcfg-rh: add support for gateway ping timeout 2013-07-12 22:32:06 -05:00
Dan Williams
7c2abb2c9f core: fix stray semicolon causing VPN routes to not be added 2013-07-12 14:09:05 -05:00
Pavel Šimerda
317bd6bf6c trivial: check for NULL setting in nm_ip6_config_merge_setting() 2013-07-12 18:45:52 +02:00
Pavel Šimerda
7c0657a119 core: cleanup nm-ip[46]-config 2013-07-12 11:38:35 +02:00
Jiří Klimeš
fc9f7e06b9 nm-online: describe '--timeout' option more exactly (rh #969363) 2013-07-11 15:21:22 +02:00
Pavel Šimerda
19747082b2 trivial: remove unused tried_ipv6 2013-07-09 12:29:47 +02:00
Pavel Šimerda
fca1c0d88f trivial: move vpn/bonding functions out of nm-system
As nm-system only contained auxiliary functions which fit in their
respective modules better, it can be safely removed.
2013-07-05 17:27:15 +02:00
Pavel Šimerda
019dd1b7d8 trivial: remove unused system.h includesl 2013-07-05 17:22:34 +02:00
Pavel Šimerda
becbf1a84c core: enable libgsystem
Got build problems with some of the pavlix/runtime patches without that.
2013-07-05 00:58:56 +02:00
Pavel Šimerda
7dcec4d100 trivial: move back nm_match_spec_string()
Was moved by accident.
2013-07-04 20:20:27 +02:00
Pavel Šimerda
c1538496a9 trivial: simplify nm_ip[46]_config_diff() NULL comparison logic 2013-07-04 18:15:30 +02:00
Pavel Šimerda
253906ecd2 trivial: simplify nm_ip[46]_config_diff() result check
nm_ip[46]_config_diff() explicitly checks for NULL arguments.
2013-07-04 18:15:08 +02:00
Pavel Šimerda
3e534c0e65 dhcp: use nm_ip[46]_config_get_gateway() in tests 2013-07-04 17:45:49 +02:00
Pavel Šimerda
8de1b1732e trivial: move merge_ip6_configs() to nm-ip6-config 2013-07-04 13:37:26 +02:00
Pavel Šimerda
6cdc16d147 core: use nm_ip[46]_config_get_gateway() 2013-07-04 13:22:46 +02:00
Jiří Klimeš
b40e5f4aa9 libnm-util: fix possible crash when IP method is NULL 2013-07-03 16:50:18 +02:00
Pavel Šimerda
7967a6524a trivial: move a couple of functions to nm-ip[46]-config
Note that this patch doesn't effectively change any code.

Functions moved from nm-system:

* nm_system_apply_ip?_config → nm_ip?_config_commit
* ip?_dest_in_same_subnet → nm_ip?_config_destination_is_direct

Functions moved from NetworkManagerUtils:

* nm_utils_merge_ip?_config → nm_ip?_config_merge_setting

Functions renamed (and moved down to form one group):

* nm_ip?_config_new_for_interface → nm_ip?_config_capture

(The rationale for the rename is that from the achitectural point of
view it doesn't matter whether the function creates a new object or
updates an existing one. After the rename, it's obvious that
nm_ip?_config_capture() and nm_ip?_config_commit() are counterparts of
each other.)
2013-07-03 16:12:23 +02:00
Jiří Klimeš
f8c8d67e93 cli: fix quitting nmcli on 'nmcli con up'
We should also quit on 'DEACTIVATED' state' when monitoring active connection
state.

Reproducer:
nmcli con add con-name myvlan dev eth1 id 88
nmcli -p con up myvlan
2013-07-03 13:54:06 +02:00
Jiří Klimeš
3eac01256c cli: correct printing success indication on 'nmcli con up' 2013-07-03 13:53:58 +02:00
Jiří Klimeš
e2b7c4824d core: fix IP_DONE vs. IP_FAIL states
0652d9c596 changed IP states like this:
        |        old behaviour          |  new behaviour
---------------------------------------------------------
success | IP_DONE && config is not NULL |    IP_DONE
failure | IP_DONE && config is NULL     |    IP_FAIL

But some failure paths was not updated.
2013-07-03 10:48:14 +02:00
Pavel Šimerda
ca6b360089 core: don't use flags for nm_system_apply_ip[46]_config
nm_platform_*_sync() functions check the cached kernel configuration
items (addresses, routes) before adding addresses to the kernel.
Therefore we don't need to be so careful about pushing NetworkManager
configuration to the kernel.

This patch helps to avoid having to compare nm_ip[46]_config objects,
which should only be created when a configuration change is being
performed.
2013-07-02 22:49:56 +02:00
Pavel Šimerda
7a7d171d6a trivial: remove obsolete FIXME 2013-07-02 21:16:22 +02:00
Pavel Šimerda
ed9065c978 vpn: don't misuse parent's prefix length
The VPN gateway is a single address.
2013-07-02 20:51:53 +02:00