Age | Commit message (Collapse) | Author | Files | Lines |
|
Let the matching continue when we are autocompleting arguments and we
have already found 'id', 'uuid' or 'path'.
Before:
# nmcli connection modify path<TAB>
path
After:
# nmcli connection modify path<TAB>
path
pathfinder-wifi
|
|
'help' is completed without considering other alternatives:
# nmcli connection modify h<TAB>
help
After the patch:
# nmcli connection modify h<TAB>
help
home-wifi
Fixes: 29bb6ae4fec37db177418bae9d9462b577d3b2fd
|
|
It looks bad and makes everyone super-sad:
$ nmcli --ask c modify 'Oracle HQ' 802-11-wireless-security.psk solaris666
System policy prevents modification of network settings for all users
(action_id: org.freedesktop.NetworkManager.settings.modify.system)
Password (lkundrak): *********
$
|
|
With --ask it might call back to nmcli's agent, causing a deadlock
while the client is waiting for the response. Let's give the client
a chance to service the agent requests while waiting:
$ nmcli --ask --show-secrets c show 'Oracle HQ'
<hang>
This is probably still rather suboptimal and inefficient, since we
still serialize the calls and block on response. However, if we submit
multiple calls to GetSecrets, the daemon would start authorizing the
first one and fail the other ones immediately before the authorization
succeeds.
This could perhaps be addressed in the daemon, but let's settle for a
fix that's compatible with the current daemon for now.
|
|
Substrings matching the heading of valid values were allowed if not
ambiguous (e.g.: "et" for "eth"). Moreover, upper case variants were
accepted too.
Do a plain string comparison check against the valid values.
Improve also the error message: give a list of valid tx-hashes.
|
|
when input matched the heading of two allowed values the match was
reported as ambiguous without checking if there was a perfect match
following: fixed.
Example of a failing input:
const char **allowed = [ "ipv4, ipv6, ip" ];
const char *input = "ip";
"ip" was detected as ambiguous.
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1541922
|
|
GCC 8.0's -Wcast-function-type objects casting function pointers to ones
with incompatible prototypes. Sometimes we do that on purpose though.
Notably, the g_source_set_callback()'s func argument can point to functions
of various prototypes. Also, libnm-glib/nm-remote-connection is perhaps
just not worth reworking, that would just be a waste of time.
A cast to void(*)(void) avoids the GCC warning, let's use it.
|
|
|
|
We commonly only allow tabs at the beginning of a line, not
afterwards. The reason for this style is so that the code
looks formated right with tabstop=4 and tabstop=8.
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1538699
|
|
Hook the signal handlers right before the main loop. Prior to that
the default handlers are good enough and our one crashes (due to
loop being instantialized).
Also, set the return value properly to indicate a termination by a
signal.
|
|
On "nmcli agent all", when the polkit agent fails (while the NM agent
succeeds), the failure is not communicated until the client exits.
|
|
|
|
|
|
RHEL 7.1 and Ubuntu 14.04 LTS both have this.
https://bugzilla.gnome.org/show_bug.cgi?id=792323
|
|
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
|
|
The FILS(Fast Initial Link Setup) is a specification defined by IEEE 802.11ai to
speed up roaming. This patch adds support of it.
I have tested with these cases.
+-----+-------------------------+----------------+
| STA | AP | |
|FILS | key-mgmt | result |
+-----+-------------------------+----------------+
| 1 | WPA-EAP | O |
+-----+-------------------------+----------------+
| 1 | WPA-EAP-SHA256 | O |
+-----+-------------------------+----------------+
| 1 | FILS-SHA256 | X |
+-----+-------------------------+----------------+
| 1 | FILS-SHA384 | X |
+-----+-------------------------+----------------+
| 1 | WPA-EAP WPA-EAP-SHA256 | O |
| | FILS-SHA256 FILS-SHA384 | WPA-EAP-SHA256 |
+-----+-------------------------+----------------+
| 2 | WPA-EAP | O |
+-----+-------------------------+----------------+
| 2 | WPA-EAP-SHA256 | O |
+-----+-------------------------+----------------+
| 2 | FILS-SHA256 | O |
+-----+-------------------------+----------------+
| 2 | FILS-SHA384 | O |
+-----+-------------------------+----------------+
| 2 | WPA-EAP WPA-EAP-SHA256 | O |
| | FILS-SHA256 FILS-SHA384 | FILS-SHA384 |
+-----+-------------------------+----------------+
| 3 | WPA-EAP | X |
+-----+-------------------------+----------------+
| 3 | WPA-EAP-SHA256 | X |
+-----+-------------------------+----------------+
| 3 | FILS-SHA256 | O |
+-----+-------------------------+----------------+
| 3 | FILS-SHA384 | O |
+-----+-------------------------+----------------+
| 3 | WPA-EAP WPA-EAP-SHA256 | O |
| | FILS-SHA256 FILS-SHA384 | FILS-SHA384 |
+-----+-------------------------+----------------+
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
|
|
this allows centralizing default values definition and allows quicker
and safer update of default values.
|
|
Fixes: 112f8bd5aff2c5d543699d968f56c7f98be07eec
|
|
Similarly to what systemd-resolved does, introduce the concept of
"routing" domain, which is a domain in the search list that is used
only to decide the interface over which a query must be forwarded, but
is not used to complete unqualified host names. Routing domains are
those starting with a tilde ('~') before the actual domain name.
Domains without the initial tilde are used both for completing
unqualified names and for the routing decision.
|
|
The `settings-docs.c` file is generated by processing the
`nm-property-docs.xml` file. Although this works in autotools,
the `.c` extension makes meson not to handle it properly.
Given the fact that it only contains a number of defines it
makes sense to change its extension to `.h` an use it as a header.
This also makes meson to handle it properly and build it before
its used.
https://mail.gnome.org/archives/networkmanager-list/2018-January/msg00057.html
|
|
|
|
We also unconditionally use them with autotools.
Also, the detection for have_version_script does
not seem correct to me. At least, it didn't work
with clang.
|
|
The strings holding the names used for libraries have also been
moved to different variables. This way they would be less error
as these variables can be reused easily and any typing error
would be quickly detected.
|
|
Some targets are missing dependencies on some generated sources in
the meson port. These makes the build to fail due to missing source
files on a highly parallelized build.
These dependencies have been resolved by taking advantage of meson's
internal dependencies which can be used to pass source files,
include directories, libraries and compiler flags.
One of such internal dependencies called `core_dep` was already in
use. However, in order to avoid any confusion with another new
internal dependency called `nm_core_dep`, which is used to include
directories and source files from the `libnm-core` directory, the
`core_dep` dependency has been renamed to `nm_dep`.
These changes have allowed minimizing the build details which are
inherited by using those dependencies. The parallelized build has
also been improved.
|
|
Add support for mDNS as a connection-level property. Update ifcfg-rh and
keyfile plugins to support it.
|
|
This header is already included by "nm-default.h".
|
|
Note that:
- we compile some source files multiple times. Most notably those
under "shared/".
- we include a default header "shared/nm-default.h" in every source
file. This header is supposed to setup a common environment by defining
and including parts that are commonly used. As we always include the
same header, the header must behave differently depending
one whether the compilation is for libnm-core, NetworkManager or
libnm-glib. E.g. it must include <glib/gi18n.h> or <glib/gi18n-lib.h>
depending on whether we compile a library or an application.
For that, the source files need the NETWORKMANAGER_COMPILATION #define
to behave accordingly.
Extend the define to be composed of flags. These flags are all named
NM_NETWORKMANAGER_COMPILATION_WITH_*, they indicate which part of the
build are available. E.g. when building libnm-core.la itself, then
WITH_LIBNM_CORE, WITH_LIBNM_CORE_INTERNAL, and WITH_LIBNM_CORE_PRIVATE
are available. When building NetworkManager, WITH_LIBNM_CORE_PRIVATE
is not available but the internal parts are still accessible. When
building nmcli, only WITH_LIBNM_CORE (the public part) is available.
This granularily controls the build.
|
|
Implement support for IP tunnel flags. Currently only some IPv6 tunnel
flags are supported. Example:
# nmcli connection add type ip-tunnel mode ip6ip6 \
ip-tunnel.flags ip6-ign-encap-limit,ip6-use-orig-tclass \
ifname abc ip-tunnel.parent ens8 ipv4.method disabled \
ipv6.method manual ipv6.address ::8888 remote ::42
# ip -d l
61: abc@ens8: <NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue ...
link/tunnel6 :: brd ::42 promiscuity 0
ip6tnl ip6ip6 remote ::42 local :: dev ens8 encaplimit none
hoplimit 0 tclass inherit ...
https://bugzilla.gnome.org/show_bug.cgi?id=791846
|
|
The install directories of those targets that match the default
install directories have been removed because they are redundant.
This also allows a simple meson build files and it is unnecessary
to create some paths.
https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00078.html
|
|
Add a new device state reason code for unsupported IP method. It is
returned, for example, when users select manual IP configuration for
WWAN connections:
# nmcli connection mod Gsm ipv4.method manual ipv4.address 1.2.3.4/32
# nmcli connection up Gsm
Error: Connection activation failed: The selected IP method is not
supported
compared to the old:
Error: Connection activation failed: IP configuration could not be
reserved (no available address, timeout, etc.)
Note that we could instead fail the connection validation if the
method is not supported by the connection type, but adding such
limitation now could make existing connections invalid.
https://bugzilla.redhat.com/show_bug.cgi?id=1459529
|
|
Documentation was not working in meson due to problems with files
generated in `libnm`. To avoid these problems, workarounds were
used. This problems have been recently fixed so these workarounds
are not necessary anymore.
https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00061.html
|
|
Makes sense in order for the user to know that they're actually typing
the password (edited just to illustrate the point, the actual output was
shamefully messy and perhaps needs fixing too):
$ nmcli c up Wrathmosphere
Passwords or encryption keys are required to access the wireless network 'Wrathmosphere'.
Password (802-1x.password): *********
|
|
Having it in libnm doesn't make any sense and prevents using it for more
internal functionality.
Too bad nm_utils_wifi_strength_bars() is already a public API.
No problem -- replace it with a compatible yet dumber equivalent.
|
|
History is probably even not useful at all outside the interactive edit
mode, but that is another story. This just avoids awkward surprises,
such as:
https://bugzilla.gnome.org/show_bug.cgi?id=791200
|
|
|
|
Source files for enum types are generated by passing segments of the
source code of the files to the `glib-mkenums` command.
This patch removes those parameters where source code is used from
meson build files by moving those segmeents to template files.
https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00057.html
|
|
Ensure @cmd_arg0 is not freed when returning it.
Fixes: 886994359411e08d66a6b4bc8bacb68360d5176a
|
|
There are some tests located in different directories which are
using the same name. To avoid any confussion a prefix was used to
name the test and the target.
This patch uses the prefix just for the target, to avoid any
collision that may happen, and uses the `test-` pattern as the
name.
https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00051.html
|
|
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
[thaller@redhat.com: rebased patch and adjusted for iwd support]
https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00022.html
|
|
In most cases, it copies the entire strv needlessly.
We can do better.
Also, the max_tokens argument is handled wrongly (albeit
not used anywhere anymore).
|
|
nmc_strsplit_set() handles max_token wrong. It cannot call
g_strsplit_set() with max_token first, and then split empty
words. You cannot use g_strsplit_set() to achieve what
nmc_strsplit_set() wants to do, unless you first split all
tokens, then them construct them together again -- thereby
loosing the delimiters.
Anyway, there are just a few caller that do essentially the same.
Refactor the code to not use nmc_strsplit_set().
|
|
nmc_strsplit_set()'s max_token argument is broken,
because it *first* calls g_strsplit_set() and then removes
empty tokens. It wasn't an issue, because DEFINE_SETTER_PRIV_KEY()
would first already remove leading spaces, and who uses multiple
spaces anyway...
Anyway, refactor DEFINE_SETTER_PRIV_KEY() to not use it.
|
|
Probably not critical, because it will still include
the terminating NULL, and just continue to fill the
temporary buffer with static addresses.
Found by coverity.
Fixes: bfb9fd0d2f3d602a69537fe7776426ee9202ce9e
|
|
What works:
nmcli c add con-name dum0 ifname dum0 type dummy \
tc.tfilters 'parent 1234: matchall action drop, parent ffff: matchall action drop'
nmcli c modify dum0 -tc.tfilters 'parent ffff: matchall action drop'
nmcli c modify dum0 +tc.tfilters 'parent ffff: matchall action simple sdata Hello'
|
|
|
|
What works:
nmcli c add con-name dum0 ifname dum0 type dummy \
tc.qdiscs 'ingress, root pfifo_fast'
nmcli c modify dum0 -tc.qdiscs 'root pfifo_fast'
nmcli c modify dum0 +tc.qdiscs 'root handle 666: fq_codel'
|
|
Currently is only able to hold the queueing disciplines.
|
|
The num/i variables are initialized from libnm API and used
back at them. The integer types should match.
|