Commit 0f2f1121569d37b3b332032a9604219b644c9e30

Authored by bellard
1 parent 4721c457

tun-fd fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@700 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 1 deletions
... ... @@ -1728,6 +1728,9 @@ int main(int argc, char **argv)
1728 1728 macaddr[4] = 0x34;
1729 1729 macaddr[5] = 0x56;
1730 1730  
  1731 + for(i = 0; i < MAX_NICS; i++)
  1732 + nd_table[i].fd = -1;
  1733 +
1731 1734 for(;;) {
1732 1735 c = getopt_long_only(argc, argv, "hm:d:n:sp:L:", long_options, &long_index);
1733 1736 if (c == -1)
... ... @@ -1934,7 +1937,6 @@ int main(int argc, char **argv)
1934 1937 /* init host network redirectors */
1935 1938 for(i = 0; i < MAX_NICS; i++) {
1936 1939 NetDriverState *nd = &nd_table[i];
1937   - nd->fd = -1;
1938 1940 /* init virtual mac address */
1939 1941 nd->macaddr[0] = macaddr[0];
1940 1942 nd->macaddr[1] = macaddr[1];
... ...