Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
7ae13660
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7ae13660
编写于
3月 14, 2008
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't set MAC on TAP devs. Pass TAP device name to QEMU
上级
88851917
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
17 deletion
+11
-17
ChangeLog
ChangeLog
+7
-0
src/bridge.c
src/bridge.c
+0
-13
src/bridge.h
src/bridge.h
+0
-1
src/qemu_conf.c
src/qemu_conf.c
+4
-3
未找到文件。
ChangeLog
浏览文件 @
7ae13660
Fri Mar 14 16:38:34 EDT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/bridge.c, src/bridge.h: Don't set MAC address on TAP
device.
* src/qemu_conf.c: Pass ifname= param along with TAP file
handle for Xenner
Fri Mar 14 16:55:34 CET 2008 Daniel Veillard <veillard@redhat.com>
* po/*: updated translations
...
...
src/bridge.c
浏览文件 @
7ae13660
...
...
@@ -313,7 +313,6 @@ brDeleteInterface(brControl *ctl ATTRIBUTE_UNUSED,
int
brAddTap
(
brControl
*
ctl
,
const
char
*
bridge
,
unsigned
char
*
macaddr
,
char
*
ifname
,
int
maxlen
,
int
*
tapfd
)
...
...
@@ -357,18 +356,6 @@ brAddTap(brControl *ctl,
}
if
(
ioctl
(
fd
,
TUNSETIFF
,
&
try
)
==
0
)
{
struct
ifreq
addr
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
memcpy
(
addr
.
ifr_hwaddr
.
sa_data
,
macaddr
,
6
);
addr
.
ifr_hwaddr
.
sa_family
=
ARPHRD_ETHER
;
/* Device actually starts in 'UP' state, but it
* needs to be down to set the MAC addr
*/
if
((
errno
=
brSetInterfaceUp
(
ctl
,
try
.
ifr_name
,
0
)))
goto
error
;
if
(
ioctl
(
fd
,
SIOCSIFHWADDR
,
&
addr
)
!=
0
)
goto
error
;
if
((
errno
=
brAddInterface
(
ctl
,
bridge
,
try
.
ifr_name
)))
goto
error
;
if
((
errno
=
brSetInterfaceUp
(
ctl
,
try
.
ifr_name
,
1
)))
...
...
src/bridge.h
浏览文件 @
7ae13660
...
...
@@ -62,7 +62,6 @@ int brDeleteInterface (brControl *ctl,
int
brAddTap
(
brControl
*
ctl
,
const
char
*
bridge
,
unsigned
char
*
mac
,
char
*
ifname
,
int
maxlen
,
int
*
tapfd
);
...
...
src/qemu_conf.c
浏览文件 @
7ae13660
...
...
@@ -1175,7 +1175,7 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn,
obj
=
xmlXPathEval
(
BAD_CAST
"string(/domain/os/type[1])"
,
ctxt
);
if
((
obj
==
NULL
)
||
(
obj
->
type
!=
XPATH_STRING
)
||
(
obj
->
stringval
==
NULL
)
||
(
obj
->
stringval
[
0
]
==
0
))
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_OS_TYPE
,
NULL
);
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_OS_TYPE
,
"no OS type"
);
goto
error
;
}
if
(
!
virCapabilitiesSupportsGuestOSType
(
driver
->
caps
,
(
const
char
*
)
obj
->
stringval
))
{
...
...
@@ -1540,7 +1540,6 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
}
if
((
err
=
brAddTap
(
driver
->
brctl
,
brname
,
net
->
mac
,
ifname
,
BR_IFNAME_MAXLEN
,
&
tapfd
)))
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"Failed to add tap interface '%s' to bridge '%s' : %s"
,
...
...
@@ -1548,7 +1547,9 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
goto
error
;
}
snprintf
(
tapfdstr
,
sizeof
(
tapfdstr
),
"tap,fd=%d,script=,vlan=%d"
,
tapfd
,
vlan
);
snprintf
(
tapfdstr
,
sizeof
(
tapfdstr
),
"tap,fd=%d,script=,vlan=%d,ifname=%s"
,
tapfd
,
vlan
,
ifname
);
if
(
!
(
retval
=
strdup
(
tapfdstr
)))
goto
no_memory
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录