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

Reply via email to