script=no for the TUN/TAP net option, by Jean-Christian de Rivaz
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2376 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c4e27dd441
commit
6a1cbf68b7
|
@ -358,7 +358,8 @@ hostname reported by the builtin DHCP server.
|
||||||
@item -net tap[,vlan=n][,fd=h][,ifname=name][,script=file]
|
@item -net tap[,vlan=n][,fd=h][,ifname=name][,script=file]
|
||||||
Connect the host TAP network interface @var{name} to VLAN @var{n} and
|
Connect the host TAP network interface @var{name} to VLAN @var{n} and
|
||||||
use the network script @var{file} to configure it. The default
|
use the network script @var{file} to configure it. The default
|
||||||
network script is @file{/etc/qemu-ifup}. If @var{name} is not
|
network script is @file{/etc/qemu-ifup}. Use @option{script=no} to
|
||||||
|
disable script execution. If @var{name} is not
|
||||||
provided, the OS automatically provides one. @option{fd=h} can be
|
provided, the OS automatically provides one. @option{fd=h} can be
|
||||||
used to specify the handle of an already opened host TAP interface. Example:
|
used to specify the handle of an already opened host TAP interface. Example:
|
||||||
|
|
||||||
|
|
3
vl.c
3
vl.c
|
@ -3289,7 +3289,7 @@ static int net_tap_init(VLANState *vlan, const char *ifname1,
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!setup_script)
|
if (!setup_script || !strcmp(setup_script, "no"))
|
||||||
setup_script = "";
|
setup_script = "";
|
||||||
if (setup_script[0] != '\0') {
|
if (setup_script[0] != '\0') {
|
||||||
/* try to launch network init script */
|
/* try to launch network init script */
|
||||||
|
@ -6066,6 +6066,7 @@ void help(void)
|
||||||
"-net tap[,vlan=n][,fd=h][,ifname=name][,script=file]\n"
|
"-net tap[,vlan=n][,fd=h][,ifname=name][,script=file]\n"
|
||||||
" connect the host TAP network interface to VLAN 'n' and use\n"
|
" connect the host TAP network interface to VLAN 'n' and use\n"
|
||||||
" the network script 'file' (default=%s);\n"
|
" the network script 'file' (default=%s);\n"
|
||||||
|
" use 'script=no' to disable script execution;\n"
|
||||||
" use 'fd=h' to connect to an already opened TAP interface\n"
|
" use 'fd=h' to connect to an already opened TAP interface\n"
|
||||||
#endif
|
#endif
|
||||||
"-net socket[,vlan=n][,fd=h][,listen=[host]:port][,connect=host:port]\n"
|
"-net socket[,vlan=n][,fd=h][,listen=[host]:port][,connect=host:port]\n"
|
||||||
|
|
Loading…
Reference in a new issue