mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Fix an initialization problem in previous patch
* src/bridge.c: fix struct ifreq ifr init in brAddTap()
This commit is contained in:
parent
13e5668a84
commit
d3209478d5
@ -465,7 +465,7 @@ brAddTap(brControl *ctl,
|
|||||||
int *tapfd)
|
int *tapfd)
|
||||||
{
|
{
|
||||||
int fd, len;
|
int fd, len;
|
||||||
struct ifreq ifr = {0};
|
struct ifreq ifr;
|
||||||
|
|
||||||
if (!ctl || !ctl->fd || !bridge || !ifname)
|
if (!ctl || !ctl->fd || !bridge || !ifname)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -473,6 +473,8 @@ brAddTap(brControl *ctl,
|
|||||||
if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
|
if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
||||||
|
memset(&ifr, 0, sizeof(ifr));
|
||||||
|
|
||||||
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
|
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
|
||||||
|
|
||||||
#ifdef IFF_VNET_HDR
|
#ifdef IFF_VNET_HDR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user