An upcoming patch has a use for a tap device to be created that
doesn't need to be actually put into the "up" state, and keeping it
"down" keeps the output of ifconfig from being unnecessarily cluttered
(ifconfig won't show down interfaces unless you add "-a").
bridge.[ch]: add "up" as an arg to brAddTap()
uml_conf.c, qemu_command.c: add "up" (set to "true") to brAddTap() call.
&net->ifname,
tapmac,
vnet_hdr,
+ true,
&tapfd))) {
if (err == ENOTSUP) {
/* In this particular case, give a better diagnostic. */
&net->ifname,
tapmac,
0,
+ true,
NULL))) {
if (err == ENOTSUP) {
/* In this particular case, give a better diagnostic. */
char **ifname,
const unsigned char *macaddr,
int vnet_hdr,
+ bool up,
int *tapfd)
{
int fd;
goto error;
if ((errno = brAddInterface(ctl, bridge, ifr.ifr_name)))
goto error;
- if ((errno = brSetInterfaceUp(ctl, ifr.ifr_name, 1)))
+ if (up && ((errno = brSetInterfaceUp(ctl, ifr.ifr_name, 1))))
goto error;
if (!tapfd &&
(errno = ioctl(fd, TUNSETPERSIST, 1)))
char **ifname,
const unsigned char *macaddr,
int vnet_hdr,
+ bool up,
int *tapfd);
int brDeleteTap (brControl *ctl,