提交 d3209478 编写于 作者: A Aron Griffis 提交者: Daniel Veillard

Fix an initialization problem in previous patch

* src/bridge.c: fix struct ifreq ifr init in brAddTap()
上级 13e5668a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册