mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
Fix an initialization problem in previous patch
* src/bridge.c: fix struct ifreq ifr init in brAddTap()
This commit is contained in:
1 parent
13e5668a84
commit
d3209478d5
1 file changed
+3
-1
+3
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user