提交 f5c5e381 编写于 作者: M Mark McLoughlin 提交者: Anthony Liguori

net: fix vnet_hdr handling in solaris tap code

Print an error if the user specifies vnet_hdr=1 on the cmdline.
Signed-off-by: NMark McLoughlin <markmc@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 df6c2a0f
......@@ -180,6 +180,17 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
return -1;
}
pstrcpy(ifname, ifname_size, dev);
if (*vnet_hdr) {
/* Solaris doesn't have IFF_VNET_HDR */
*vnet_hdr = 0;
if (vnet_hdr_required && !*vnet_hdr) {
qemu_error("vnet_hdr=1 requested, but no kernel "
"support for IFF_VNET_HDR available");
close(fd);
return -1;
}
}
fcntl(fd, F_SETFL, O_NONBLOCK);
return fd;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册