[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Setting a interface name with qemu-bridge-helper?

From: Thomas Huth
Subject: Re: [Qemu-discuss] Setting a interface name with qemu-bridge-helper?
Date: Tue, 16 Jan 2018 06:22:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 15.01.2018 21:04, Shaun Reitan wrote:
> You can specifiy a ifname is you use -netdev tap however if you try and
> use the bridge-helper script you get an error. Also looking at the code
> of the bridge-helper I can see there is no logic for specificing a name.
>  I've already modified the helper script to now allow a name to be
> passed. I'm just now having difficulty figuring out what sections in the
> qemu source need to be modifed to allow this as well.

Ah, now I see. There is a check in net_init_tap() in net/tap.c, indeed.
I guess you've got to remove the "tap->has_ifname" from this check:

 if (tap->has_ifname || tap->has_script || tap->has_downscript ||
            tap->has_vnet_hdr || tap->has_queues || tap->has_vhostfds) {
            error_setg(errp, "ifname=, script=, downscript=, vnet_hdr=, "
                       "queues=, and vhostfds= are invalid with helper=");
            return -1;

... and then you could pass "tap->ifname" as additional parameter to
net_bridge_run_helper() which then could pass it as additional argument
to the bridge helper script. ... well, it's just a guess, I haven't
tried it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]