From owner-freebsd-net@FreeBSD.ORG Tue Feb 15 16:30:21 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBAA41065675 for ; Tue, 15 Feb 2011 16:30:21 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id A2E7F8FC0C for ; Tue, 15 Feb 2011 16:30:21 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p1FGUFqY094706 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 15 Feb 2011 08:30:19 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4D5AAA28.50408@freebsd.org> Date: Tue, 15 Feb 2011 08:30:32 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Arnaud Lacombe References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nikolay Denev , freebsd-net@freebsd.org Subject: Re: ng_ether and vlan interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 16:30:22 -0000 On 2/15/11 7:47 AM, Arnaud Lacombe wrote: > Hi, > > On Tue, Feb 15, 2011 at 9:02 AM, Nikolay Denev wrote: >> Hi, >> >> When trying to use ng_ether with vlan interfaces using the naming sheme ${parent_if}.${vlan_tag} >> it produces the following warning : >> >> ng_ether_attach: can't name node ix0.512 >> >> And the newly created netgraph node stays. >> >> This is due to the following check in sys/netgraph/ng_base.c:ng_name_node() : >> >> /* Check the name is valid */ >> for (i = 0; i< NG_NODESIZ; i++) { >> if (name[i] == '\0' || name[i] == '.' || name[i] == ':') >> break; >> } >> >> Do we really do not want to allow dot in the name? > > From sys/ng_base.c: > /* > * Find a node by absolute name. The name should NOT end with ':' > * The name "." means "this node" and "[xxx]" means "the node > * with ID (ie, at address) xxx". > > Moreover, several code path strictly assume that '.' is not repeated > and enforce this. > >> If it's not an option to allow the dot, probably it would be better to replace it with >> underscore. >> > to name the current node ? It would be highly unintuitive. Also, you > would be breaking all userland relying on '.' referring to the current > node. > > Btw, ng_name_node() states that "Once assigned, the name cannot be > changed.", however I can freely rename a node multiple time with > ngctl. The comment might be bogus. > > - Arnaud > check teh code and if it is true, (no leaks are found and no race conditinas are created) then send a patch and we'll see about getting the fix in.. >> I can provide a patch if the change is acceptable. changing it to '_' might be accceptable, '.' is much like '/' in th filesystem. it is a separator. You can't have it in the name. a patch that converted . to _ would be a nice idea. please ensure that the man page is updated as well. >> Cheers, >> Nikolay_______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >