Skip to contentSkip to conversation

Do not try to use -net user as a default when slirp disabled.

PATCH Applied Ian Jackson 2 participants 2 messages Aug 28, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not try to use -net user as a default when slirp disabled.

When CONFIG_SLIRP is not defined, we should not try to use -net user as a default.

Patch from Jeremy Fitzhardinge <[email protected]> (who is a Citrix staff member).

---
 vl.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
vl.c +4 -3
index f1d92c1..81f7d8f 100644
@@ -8370,9 +8370,10 @@ int main(int argc, char **argv)
     /* init network clients */
     if (nb_net_clients == 0) {
         /* if no clients, we use a default config */
-        net_clients[0] = "nic";
-        net_clients[1] = "user";
-        nb_net_clients = 2;
+        net_clients[nb_net_clients++] = "nic";
+#ifdef CONFIG_SLIRP
+        net_clients[nb_net_clients++] = "user";
+#endif
     }
 
     for(i = 0;i < nb_net_clients; i++) {
Signature · 1 line
1.4.4.4
#1 lore raw
Quoted 6 lines · Ian Jackson

When CONFIG_SLIRP is not defined, we should not try to use -net user as a default.

Patch from Jeremy Fitzhardinge <[email protected]> (who is a Citrix staff member).

Applied. Thanks.

Regards,

Anthony Liguori