[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.01.1002041743360.21982@obet.zrqbmnf.qr>
Date: Thu, 4 Feb 2010 17:48:03 +0100 (CET)
From: Jan Engelhardt <jengelh@...ozas.de>
To: Patrick McHardy <kaber@...sh.net>
cc: Thomas Woerner <twoerner@...hat.com>, netdev@...r.kernel.org,
Netfilter Developer Mailing List
<netfilter-devel@...r.kernel.org>
Subject: Re: netfilter/iptables and network interface names
On Thursday 2010-02-04 15:55, Patrick McHardy wrote:
>>>>> What do you think?
>>
>> When was the last time you needed a control character in your
>> interface name?
>
>Actually I did use ansi-colors in my interface names once for fun :)
Madness!
>Anyways, I don't see why iptables should impose arbitrary restrictions.
Well iptables does allow \e!
>> Like this?
>>
>> @@ -473,12 +473,11 @@ void xtables_parse_interface(const char *arg, char *vianame,
>> memset(mask, 0xFF, vialen + 1);
>> memset(mask + vialen + 1, 0, IFNAMSIZ - vialen - 1);
>> for (i = 0; vianame[i]; i++) {
>> - if (vianame[i] == ':' ||
>> - vianame[i] == '!' ||
>> - vianame[i] == '*') {
>> + if (vianame[i] == '/' ||
>> + vianame[i] == ' ') {
>> fprintf(stderr,
>> "Warning: weird character in interface"
>> - " `%s' (No aliases, :, ! or *).\n",
>> + " `%s' ('/' and ' ' are not allowed by the kernel).\n",
>> vianame);
>
>The kernel also forbids ".".
My first thought was the same, but:
a) Interestingly, it does not prohibit '.'
ip tunnel add foo0.3 mode sit local 1.2.3.4 remote 5.6.7.8
b) The '.' is to be seen as valid as far as xtables.c goes, so
as to match VLAN interfaces.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists