Re: Documentation of device spec list does not agree with parser code
- From: Roger James <roger beardandsandals co uk>
- To: Thomas Haller <thaller redhat com>, networkmanager-list gnome org
- Subject: Re: Documentation of device spec list does not agree with parser code
- Date: Mon, 18 Jan 2016 15:48:50 +0000
On 18/01/16 11:21, Thomas Haller wrote:
On Mon, 2016-01-18 at 10:54 +0000, Roger James wrote:
On 17/01/16 21:04, Thomas Haller wrote:
On Fri, 2016-01-15 at 18:21 +0000, Roger James wrote:
Hi,
As far as I can see the code for parsing device interface-name
lists
in
NetworkManagerUtils.c does not agree with the man page in
NetworkManager.conf.xml.in. In particular
interface-name:IFNAME
does not support globbing. Only
interface-name:?IFNAME
Hi Roger,
where do you read "interface-name:?IFNAME". AFAIS, that is not
mentioned by upstream manpage. See.
It's either:
interface-name:=<LITERAL>
or
interface-name:~<PATTERN>
(whereas, omitting the ~ is allowed:
interface-name:<PATTERN>
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/man/
NetworkManager.conf.xml.in?id=7a2a96f8ef364e46f9c99798743c11f1ea026
59d#n920
does.
Here is the current code.
I don't see anything wrong. Can you be more specific?
There is also a unit-test: http://cgit.freedesktop.org/NetworkManag
er/NetworkManager/tree/src/tests/test-
general.c?id=7a2a96f8ef364e46f9c99798743c11f1ea02659d#n811
ciao
Thomas
Hi Thomas,
If I follow the link above, the file I arrive at has line 920-921
that looks like this
<term>interface-name:IFNAME</term>
<term>interface-name:~IFNAME</term>
That is looks the same as the one in my tree, which has its origin
at
origin git://anongit.freedesktop.org/NetworkManager/NetworkMan
ager.git (fetch)
origin git://anongit.freedesktop.org/NetworkManager/NetworkMan
ager.git (push)
There is no mention of PATTERN in the file.
Hi Roger,
yes, this is right.Sorry, I don't understand what the issue is.
I don't see any problem.
Can you please re-state what you think is wrong?
Thank you,
Thomas
Hi Thomas,
Sorry about the confusion. The ? instead of the ~ in the first message
was a typo.
To put things in context
<varlistentry>
<term>interface-name:IFNAME</term>
<term>interface-name:~IFNAME</term>
<listitem><para>Case sensitive match of interface name of the device. Simple globbing is supported
with
<literal>*</literal> and <literal>?</literal>. Ranges and escaping is not
supported.</para></listitem>
</varlistentry>
Produce the following statement in the man page entry:
interface-name:IFNAME, interface-name:~IFNAME
Case sensitive match of interface name of the device. Simple
globbing is supported with * and ?. Ranges and escaping is not
supported.
This implies that that interface-name:?on* should match for example mon0.
However the code fro the nm_match_spec_interface_name function in
NetworkManagerUtils.c, only sets the match_pattern flag if it sees a ~
character as the first character of the interface name. This is at or
around line 1322 of the source file.
I think that.
<varlistentry>
<term>interface-name:IFNAME</term>
<listitem><para>Case sensitive match of interface name of the device. Ranges and escaping is not
supported.</para></listitem>
</varlistentry>
<varlistentry>
<term>interface-name:~IFNAME</term>
<listitem><para>Case sensitive match of interface name of the device using globbing with
<literal>*</literal> and <literal>?</literal>. Ranges and escaping is not
supported.</para></listitem>
</varlistentry>
May be a more accurate statement of what the code implements.
However I am not very familiar with this code. So I might be completely
mistaken. I came across this whilst trying work out why my config was
not working on Ubuntu 15.10. However the NM version there appears to be
very old and I suspect that interface-names in the conf for exclusion
do not work for a number of other reasons :-)
Roger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]