提交 88aa9056 编写于 作者: M Markus Armbruster 提交者: Anthony Liguori

net: info network shows only VLAN clients, fix

Clients not associated with a VLAN exist since commit d80b9fc6.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit a0104e0e)
上级 b93c5c84
......@@ -1210,16 +1210,23 @@ void net_set_boot_mask(int net_boot_mask)
void do_info_network(Monitor *mon)
{
VLANState *vlan;
VLANClientState *vc;
QTAILQ_FOREACH(vlan, &vlans, next) {
VLANClientState *vc;
monitor_printf(mon, "VLAN %d devices:\n", vlan->id);
QTAILQ_FOREACH(vc, &vlan->clients, next) {
monitor_printf(mon, " %s: %s\n", vc->name, vc->info_str);
}
}
monitor_printf(mon, "Devices not on any VLAN:\n");
QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
monitor_printf(mon, " %s: %s", vc->name, vc->info_str);
if (vc->peer) {
monitor_printf(mon, " peer=%s", vc->peer->name);
}
monitor_printf(mon, "\n");
}
}
void do_set_link(Monitor *mon, const QDict *qdict)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册