mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
Revert "net: Do not fill legacy info_str for backends"
Several issues has been reported for query-netdev info
series. Consider it's late in the rc, this reverts commit
f2e8319d45.
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
d0d3dd401b
commit
d89b4f839f
8 changed files with 48 additions and 0 deletions
|
|
@ -635,6 +635,8 @@ int net_init_bridge(const Netdev *netdev, const char *name,
|
|||
stored->helper = g_strdup(helper);
|
||||
}
|
||||
|
||||
s->nc.info_str = g_strdup_printf("helper=%s,br=%s", helper, br);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -720,6 +722,8 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
|
|||
stored->fds = g_strdup_printf("%s:%d", stored->fds, fd);
|
||||
g_free(tmp_s);
|
||||
}
|
||||
|
||||
s->nc.info_str = g_strdup_printf("fd=%d", fd);
|
||||
} else if (tap->has_helper) {
|
||||
if (!stored->has_helper) {
|
||||
stored->has_helper = true;
|
||||
|
|
@ -731,6 +735,8 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
|
|||
stored->br = tap->has_br ? g_strdup(tap->br) :
|
||||
g_strdup(DEFAULT_BRIDGE_INTERFACE);
|
||||
}
|
||||
|
||||
s->nc.info_str = g_strdup_printf("helper=%s", tap->helper);
|
||||
} else {
|
||||
if (ifname && !stored->has_ifname) {
|
||||
stored->has_ifname = true;
|
||||
|
|
@ -747,6 +753,9 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
|
|||
stored->downscript = g_strdup(downscript);
|
||||
}
|
||||
|
||||
s->nc.info_str = g_strdup_printf("ifname=%s,script=%s,downscript=%s",
|
||||
ifname, script, downscript);
|
||||
|
||||
if (strcmp(downscript, "no") != 0) {
|
||||
snprintf(s->down_script, sizeof(s->down_script), "%s", downscript);
|
||||
snprintf(s->down_script_arg, sizeof(s->down_script_arg),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue