On 11/03/2011 03:54 AM, Stefan Hajnoczi wrote:
On Wed, Nov 2, 2011 at 3:12 PM, Corey Bryant wrote:
On 11/02/2011 06:58 AM, Stefan Hajnoczi wrote:
On Tue, Nov 1, 2011 at 5:13 PM, Corey Bryant
wrote:
+static bool has_vnet_hdr(int fd)
+{
+unsigned int features = 0;
+struct ifreq if
On Wed, Nov 2, 2011 at 3:12 PM, Corey Bryant wrote:
> On 11/02/2011 06:58 AM, Stefan Hajnoczi wrote:
>>
>> On Tue, Nov 1, 2011 at 5:13 PM, Corey Bryant
>> wrote:
>>>
>>> +static bool has_vnet_hdr(int fd)
>>> +{
>>> + unsigned int features = 0;
>>> + struct ifreq ifreq;
>>> +
>>> + if (io
On 11/02/2011 06:58 AM, Stefan Hajnoczi wrote:
On Tue, Nov 1, 2011 at 5:13 PM, Corey Bryant wrote:
+static bool has_vnet_hdr(int fd)
+{
+unsigned int features = 0;
+struct ifreq ifreq;
+
+if (ioctl(fd, TUNGETFEATURES,&features) == -1) {
+return false;
+}
+
+if (!(fea
On Tue, Nov 1, 2011 at 5:13 PM, Corey Bryant wrote:
> +static bool has_vnet_hdr(int fd)
> +{
> + unsigned int features = 0;
> + struct ifreq ifreq;
> +
> + if (ioctl(fd, TUNGETFEATURES, &features) == -1) {
> + return false;
> + }
> +
> + if (!(features & IFF_VNET_HDR)) {
> +
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 devices