| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Move the ckecks for nmc_arg_is_help to the beginning of the
checks for command matches.
Up to now, no command begins with 'h', so this has no behavioral
change whatsoever. But imagine a command that begins with 'h'
(for example `nmcli general hostname`), in that case `nmcli general h`
should still show the help, as users might be accustomed to this
abbreviation.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure in matches() that a non empty cmd is given, otherwise
currently
nmcli general -
matches to '-h' and is thus treated as
nmcli general -h
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
|
| |
** (process:25157): CRITICAL **: nmc_activate_connection: assertion `NM_IS_CONNECTION (connection) || ifname' failed
Error: unknown error.
Regression caused by 42c7ea85a17a7e7459942f356399e36308011c86.
|
| | |
|
| |
|
|
|
| |
Passes a NULL connection to nm_client_activate_connection() allowing
NetworkManager to pick the best available connection for the interface.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This command allows activating the edited connection.
Monitoring the progress of the activation is a bit complicated by the fact
that the callback activate_connection_editor_cb() is invoked in main loop
thread, and not in the editor thread itself.
https://bugzilla.redhat.com/show_bug.cgi?id=1004883
|
| |
|
|
| |
Found with Coverity.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Only complete the setting name if it is at the very first
position after the connection.
e.g. complete the settings name in the case
$ nmcli connection modify em1 connec<TAB>
but not at
$ nmcli connection modify em1 connection.autoconnect <TAB>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
| |
This fixes a regression caused by ecd49fb435cd15aafb9a46c85ed5c42c525d0c15
In addition, initialize Wi-Fi mode to "infrastructure".
|
| |
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
|
| |
This simplifies the code.
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=709369
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Plugins may have problems with preserving some properties on write/read cycle,
may add ipv{4,6} settings when they are not present in the connection, etc.
That makes local and remote connection differ.
So we copy remote connection into the local to get rid of such problems.
Note:
68f12b4e9c134d41e42cc8a1986cad6bb3c07b7a and
f03635e5ac829d4fc896573f2f3c6969b9d5a2e2
commits ensure that all connection (except slaves) have IPv{4,6} settings.
https://bugzilla.redhat.com/show_bug.cgi?id=997958
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When freeing one of the collections such as GArray, GPtrArray, GSList,
etc. it is common that the items inside the connections must be
freed/unrefed too.
The previous code often iterated over the collection first with
e.g. g_ptr_array_foreach and passing e.g. g_free as GFunc argument.
For one, this has the problem, that g_free has a different signature
GDestroyNotify then the expected GFunc. Moreover, this can be
simplified either by setting a clear function
(g_ptr_array_set_clear_func) or by passing the destroy function to the
free function (g_slist_free_full).
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| | |
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=710505
|
| |
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1011942
|
| |
|
|
|
|
|
|
|
|
|
| |
- completion now works for command shortcuts too
nmcli> g ethe<TAB>
- completion now allows leading spaces
nmcli> desc wifi.ss<TAB>
- fix completion of settings when property is already there
nmcli> set con<TAB>.id
- fix completion of properties in setting.property
nmcli> des con.inter<TAB> bla
|
| |
|
|
|
|
|
|
|
|
| |
This fixes an error in the following example:
$ nmcli con add type bridge con-name test-bridge <TAB>
Before, general options such as 'autoconnect' and 'ifname' were
wrongly not suggested.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The session now looks like this:
There are optional arguments for 'bond' connection type.
Do you want to provide them? (yes/no) [yes]
Bonding mode [balance-rr]:
Bonding monitoring mode (miimon or arp) [miimon]: miimon
Bonding miimon [100]:
Bonding downdelay [0]:
Bonding updelay [0]:
...when answered arp...
Bonding arp-interval [0]:
Bonding arp-ip-target [none]:
https://bugzilla.redhat.com/show_bug.cgi?id=1007355
|
| | |
|
| |
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the session looks like this:
Do you want to add IP addresses? (yes/no) [yes]
Press <Enter> to finish adding addresses.
IPv4 address (IP[/plen] [gateway]) [none]: 10.0.0.22/24 10.0.0.1
Address successfully added: 10.0.0.22/24 10.0.0.1
IPv4 address (IP[/plen] [gateway]) [none]: 10.0.0.22/24 10.0.0.1
Warning: address already present: 10.0.0.22/24 10.0.0.1
IPv4 address (IP[/plen] [gateway]) [none]: 192.168.1.1 abc
Error: invalid gateway 'abc'
IPv4 address (IP[/plen] [gateway]) [none]:
IPv6 address (IP[/plen] [gateway]) [none]: abcd::1234 ::2 blabla
Address successfully added: abcd::1234 ::2
Warning: ignoring garbage at the end: 'blabla'
IPv6 address (IP[/plen] [gateway]) [none]:
|
| |
|
|
|
| |
We don't need to hardcode the kinds of devices that are virtual here;
NMConnection already knows.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bonding options are related and some combinations don't make sense. Basically,
MIIMON and ARP monitoring mode (and related options) are mutually exclusive.
When nmcli set arp_interval of "0" (the default value),
nm_setting_bond_add_option() cleared the MIIMON options (miimon, updelay and
downdelay).
This commit works around libnm-util's nm_setting_bond_add_option() that clears
miimon options when arp_interval is being set and vice versa, but doesn't
take into account the value of "0" that should be regarded as 'disable'.
https://bugzilla.redhat.com/show_bug.cgi?id=1007355
|
| |
|
|
|
|
|
|
|
| |
The commands performing actions without an output only printed a successfull
message for --pretty mode. Some users don't like this silent operation.
This commit makes nmcli print operation success unconditionally. I think that
doesn't hurt; scripts/users can ignore the message if not interested.
https://bugzilla.redhat.com/show_bug.cgi?id=1006444
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also allow leading/trailing white spaces, and more white spaces between IP and
gateway. (Spaces in values and around / are not allowed).
All of these are accepted:
' 1.2.3.4/11 1.2.3.254 '
' 1.2.3.4 '
' fe80::215:ff:fe93:ffff/128 ::1 '
...
https://bugzilla.redhat.com/show_bug.cgi?id=1007368
|
| |
|
|
|
|
|
|
|
|
|
| |
The format of property values that nmcli prints is not the same (for some
properties) as the format nmcli editor accepts as input from user. The reasons
are that (a) output format is more descriptive and not much suitable to be
typed, (b) it comes in most cases from libnm-util.
'change' command displays current property value and allows users to edit it.
So we convert the output into input format, before presenting it to the user.
https://bugzilla.redhat.com/show_bug.cgi?id=998929
|
| |
|
|
|
| |
Wouldn't make a ton of sense to print "started" for the STARTING
property if NM wasn't running.
|
| | |
|
| |
|
|
|
| |
It says 'starting' when NM is in the process of startup (still activating
connections); 'started' when NM finished the startup.
|
| |
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| | |
|
| |
|
|
|
| |
GLib-CRITICAL **: g_strchug: assertion `string != NULL' failed
GLib-CRITICAL **: g_strchomp: assertion `string != NULL' failed
|
| |
|
|
| |
nmcli> desc AAA
|
| |
|
|
|
|
|
| |
Accept both [0,1,2] and [unknown,key,passphrase] as wep-key-type values and
set the property value correctly.
https://bugzilla.redhat.com/show_bug.cgi?id=1003945
|
| |
|
|
|
|
|
|
| |
readline() makes changes to terminal and when it doesn't receive unix signals,
it has no chance to perform cleanups on exit. So we have to call its cleanup
functions manually on exit.
https://bugzilla.gnome.org/show_bug.cgi?id=706118
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
For a multihreaded application the safest way to handle unix signals is using
a dedicated thread that processes the signals by sigwait() function. All other
threads have these signals (processed by the thread) blocked.
A few useful links:
http://pubs.opengroup.org/onlinepubs/007904975/functions/sigwait.html
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.genprogc%2Fdoc%2Fgenprogc%2Fsignal_mgmt.htm
http://www.linuxjournal.com/article/2121?page=0,2
http://www.redwoodsoft.com/~dru/unixbook/book.chinaunix.net/special/ebook/addisonWesley/APUE2/0201433079/ch12lev1sec8.html
https://www.securecoding.cert.org/confluence/display/seccode/CON37-C.+Do+not+call+signal%28%29+in+a+multithreaded+program
|
| |
|
|
|
|
|
| |
- the ifname argument for "connection add" is not mandatory
- support the long names for connection types ("802-*")
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
|
|
|
| |
We expect that UUID is set, else there are various errors. Anyway, users should
not modify connection UUID.
|
| |
|
|
|
| |
nmc_setting_reset_property() function checks whether we allow changing the property
(set_func != NULL) and if so, the property value is reset to default.
|