From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMafH-0006ES-4c for qemu-devel@nongnu.org; Fri, 12 Oct 2012 04:32:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMafG-0008Q3-2G for qemu-devel@nongnu.org; Fri, 12 Oct 2012 04:32:15 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:56844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMafF-0008O0-R4 for qemu-devel@nongnu.org; Fri, 12 Oct 2012 04:32:13 -0400 Message-ID: <5077D584.3040204@msgid.tls.msk.ru> Date: Fri, 12 Oct 2012 12:32:04 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <5076E640.4090003@linux.vnet.ibm.com> <1350024543-26211-1-git-send-email-mike@dev-zero.net> In-Reply-To: <1350024543-26211-1-git-send-email-mike@dev-zero.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] net: Allow specifying ifname for qemu-bridge-helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Lovell Cc: stefanha@gmail.com, qemu-devel@nongnu.org On 12.10.2012 10:49, Mike Lovell wrote: > /* request a tap device, disable PI, and add vnet header support if > - * requested and it's available. */ > - prep_ifreq(&ifr, "tap%d"); > + * requested and it's available. use ifname if provided for tap name. */ > + prep_ifreq(&ifr, ifname != NULL ? ifname : "tap%d"); Should we check for special symbols here? prep_ifreq() does this: snprintf(ifr->ifr_name, IFNAMSIZ, "%s", ifname); so at least it ensures we have length constraint. Actually I'm not so sure anymore this is a good idea. For example, system may have firewall (iptables) rules in place for, say, future ppp interfaces for ppp clients, and this way we may request the interface to be named pppX and be allowed to send packets where we don't usually have access to. Maybe - at least - require some common prefix for the interfaces created this way, so we'll live in our own, easily distinguishable namespace -- like, qvif* (from Qemu Virtual InterFace)? This is not a simple question really. And the whole bridge helper is quite questionable too. Thanks, /mjt