mirror of https://gitee.com/openkylin/libvirt.git
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 fd, len;
|
||||
struct ifreq ifr = {0};
|
||||
struct ifreq ifr;
|
||||
|
||||
if (!ctl || !ctl->fd || !bridge || !ifname)
|
||||
return EINVAL;
|
||||
|
@ -473,6 +473,8 @@ brAddTap(brControl *ctl,
|
|||
if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
|
||||
return errno;
|
||||
|
||||
memset(&ifr, 0, sizeof(ifr));
|
||||
|
||||
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
|
||||
|
||||
#ifdef IFF_VNET_HDR
|
||||
|
|
Loading…
Reference in New Issue