Commit 4f01035ff23b505e2feec470aee874c60cc74434
1 parent
821f7e76
Fix tap device counting.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2884 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
vl.c
... | ... | @@ -4229,6 +4229,7 @@ static int net_client_init(const char *str) |
4229 | 4229 | char ifname[64]; |
4230 | 4230 | char setup_script[1024]; |
4231 | 4231 | int fd; |
4232 | + vlan->nb_host_devs++; | |
4232 | 4233 | if (get_param_value(buf, sizeof(buf), "fd", p) > 0) { |
4233 | 4234 | fd = strtol(buf, NULL, 0); |
4234 | 4235 | ret = -1; |
... | ... | @@ -4241,7 +4242,6 @@ static int net_client_init(const char *str) |
4241 | 4242 | if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) { |
4242 | 4243 | pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT); |
4243 | 4244 | } |
4244 | - vlan->nb_host_devs++; | |
4245 | 4245 | ret = net_tap_init(vlan, ifname, setup_script); |
4246 | 4246 | } |
4247 | 4247 | } else | ... | ... |