Date: Tue, 15 Feb 2011 08:30:32 -0800 From: Julian Elischer <julian@freebsd.org> To: Arnaud Lacombe <lacombar@gmail.com> Cc: Nikolay Denev <ndenev@gmail.com>, freebsd-net@freebsd.org Subject: Re: ng_ether and vlan interfaces Message-ID: <4D5AAA28.50408@freebsd.org> In-Reply-To: <AANLkTi=bVv_M=2ShVos113Y6ROsJ3_M3Qp-wBP8=B=bH@mail.gmail.com> References: <D275511D-0502-48ED-9186-EF4BF42B372E@gmail.com> <AANLkTi=bVv_M=2ShVos113Y6ROsJ3_M3Qp-wBP8=B=bH@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2/15/11 7:47 AM, Arnaud Lacombe wrote: > Hi, > > On Tue, Feb 15, 2011 at 9:02 AM, Nikolay Denev<ndenev@gmail.com> 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<unnamed>. >> >> 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" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D5AAA28.50408>