Re: [Qemu-devel] [PATCH v3 1/4] Add basic version of bridge helper

2011-11-01 Thread Stefan Hajnoczi
On Mon, Oct 31, 2011 at 02:36:28PM -0400, Corey Bryant wrote: A couple of nitpicks regarding error handling: +static int has_vnet_hdr(int fd) +{ +unsigned int features = 0; +struct ifreq ifreq; + +if (ioctl(fd, TUNGETFEATURES, features) == -1) { +return -errno; +}

Re: [Qemu-devel] [PATCH v3 1/4] Add basic version of bridge helper

2011-11-01 Thread Corey Bryant
On 11/01/2011 04:15 AM, Stefan Hajnoczi wrote: On Mon, Oct 31, 2011 at 02:36:28PM -0400, Corey Bryant wrote: A couple of nitpicks regarding error handling: +static int has_vnet_hdr(int fd) +{ +unsigned int features = 0; +struct ifreq ifreq; + +if (ioctl(fd,

[Qemu-devel] [PATCH v3 1/4] Add basic version of bridge helper

2011-10-31 Thread Corey Bryant
This patch adds a helper that can be used to create a tap device attached to a bridge device. Since this helper is minimal in what it does, it can be given CAP_NET_ADMIN which allows qemu to avoid running as root while still satisfying the majority of what users tend to want to do with tap