ia64/xen-unstable

view tools/xm-test/configure.ac @ 16739:33dcf04d7715

tools/docs: Fix example and default IP addresses.

In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration. In general the
specific IP addresses used in Xen are not always appropriate. (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
* For examples and documentation, 192.0.2.0/24. (See RFC3330.)
* For defaults for private networks, a random network from RFC1918.
I have randomly selected 172.30.206.0/24 for this purpose and
documented this in at the only registry I know of,
www.ucam.org/cam-grin. This network should henceforth be used for
default configurations of local bridges, test networks, etc. in
Xen tools.

The following addresses should NOT be used:
* 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc. Using these
addresses gives greatly increased likelihood of collision, as
ignorant network administrators and reckless middlebox vendors
often pick networks from the bottom of 10/8 and 192.168/16.
* 169.254.*.*. These are reserved for zeroconf (ad-hoc networking)
and should not be used for Xen private networks, bridges, etc.,
etc. Use of these addresses by Xen scripts causes trouble on hosts
(eg laptops) which find themselves in ad-hoc networking
environments. I think this is not hypothetical (!) since at least
one Linux distribution have specific code to detect this case and
cause Xen startup to fail iff the host already has an external
zeroconf address.
* 1.2.3.4. WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address). If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 17 15:13:40 2008 +0000 (2008-01-17)
parents 9a39dac6660a
children
line source
1 # xm-test configure.ac input script
3 # Basic header information
4 AC_INIT([xm-test], [1.1.0])
5 AM_INIT_AUTOMAKE([1.7 foreign])
7 MK=''; AC_SUBST(MK)
9 # Check for dependencies
10 AC_PROG_CC
11 #AC_PROG_INSTALL
12 AC_CHECK_PROG([LILO], lilo, lilo, "no", [$PATH])
14 XEN_PYTHON_PATH=$(/usr/sbin/xen-python-path)
16 # Right now, we can assume that the lib/ directory
17 # is two levels above the tests
18 TESTLIB=../../lib
19 TENV="PYTHONPATH=$PYTHONPATH:$TESTLIB:$XEN_PYTHON_PATH"
21 AC_ARG_ENABLE(hvm-support,
22 [[ --enable-hvm-support enable hardware virtual machine assist]],
23 [
24 ENABLE_HVM=True
25 ],[
26 ENABLE_HVM=False
27 ])
29 if test "x$ENABLE_HVM" = "xTrue"; then
30 if test "$LILO" = "no"; then
31 AC_MSG_ERROR([lilo not found
32 lilo version 22.7 or greater must be installed for testing with hvm enabled.])
33 else
34 pass=`$LILO -V | sed -e "s/LILO version //" | awk -F "." '{if ($1 >=22 && $2 >= 7) print "true"; else print "false"}'`
35 if test "$pass" != "true"; then
36 AC_MSG_ERROR(Lilo version must be equal or greater to 22.7+.)
37 fi
38 fi
39 fi
41 AM_CONDITIONAL(HVM, test x$ENABLE_HVM = xTrue)
42 AC_SUBST(ENABLE_HVM)
44 AC_ARG_ENABLE(full-labeling,
45 [[ --enable-full-labeling allows the test suite to label all resources]],
46 [
47 ENABLE_LABELING=True
48 ],[
49 ENABLE_LABELING=False
50 ])
52 if test "x$ENABLE_LABELING" = "xTrue"; then
53 echo "ACM_LABEL_RESOURCES = True" > lib/XmTestLib/acm_config.py
54 else
55 rm -f lib/XmTestLib/acm_config.py*
56 fi
58 # Network needs to know ips to use: dhcp or a range of IPs in the form
59 # of: 192.0.2.1-192.0.2.100
60 # If not dhcp, a netmask and network address must be supplied. Defaults to
61 # range allocated in www.ucam.org/cam-grin.
62 NET_IP_RANGE="172.30.206.1-172.30.206.254"
63 AC_ARG_WITH(net-ip-range,
64 [ --with-net-ip-range=ip-range Set a range of ip addresses to use for xm-test guest domain networks. Can specify dhcp or a range of IPs: 192.0.2.1-192.0.2.100 [[default="172.30.206.1-172.30.206.254"]]],
65 [ NET_IP_RANGE="$withval" ])
67 iprange=`echo $NET_IP_RANGE | perl -e 'while(<>) { print if /\d+\.\d+\.\d+\.\d+-\d+\.\d+\.\d+\.\d+/ }'`
69 NETWORK_ADDRESS="172.30.206.0"
70 AC_ARG_WITH(network-address,
71 [ --with-network-address=ip Set network address to use with ip range [[default="172.30.206.0"]]],
72 [ NETWORK_ADDRESS="$withval" ])
74 NETMASK="255.255.255.0"
75 AC_ARG_WITH(netmask,
76 [ --with-netmask=mask Set netmask to use with ip range [[default="255.255.255.0"]]],
77 [ NETMASK="$withval" ])
79 if test "x$NET_IP_RANGE" != "xdhcp" && test -z "$iprange"
80 then
81 AC_MSG_ERROR(Invalid net-ip-range.)
82 fi
84 AC_SUBST(NET_IP_RANGE)
85 AC_SUBST(NETWORK_ADDRESS)
86 AC_SUBST(NETMASK)
88 DOM0_INTF="eth0"
89 AC_ARG_WITH(dom0-intf,
90 [ --with-dom0-intf=intf Set dom0 interface name [[default="eth0"]]],
91 [ DOM0_INTF="$withval" ])
93 AC_SUBST(DOM0_INTF)
95 AC_ARG_WITH(hvm-kernel,
96 [[ --with-hvm-kernel=kernel Use this kernel for hvm disk.img testing]],
97 HVMKERNEL=$withval,
98 HVMKERNEL="no")
100 dnl substitute @HVMKERNEL@ in all Makefiles
101 AC_SUBST(HVMKERNEL)
103 AC_ARG_WITH(driver-dir,
104 [[ --with-driver-dir=drvdir Look in this directory for the pcnet32 driver for the vmx disk.img. drvdir can equal key word "builtin" if driver is built into the kernel]],
105 DRVDIR=$withval,
106 DRVDIR="no")
108 dnl substitute @DRVDIR@ in all Makefiles
109 AC_SUBST(DRVDIR)
111 NETDRV="8139too.ko"
112 AC_ARG_WITH(network-drv,
113 [ --with-network-drv=driver Set network driver to use [[default="8139too.ko"]]],
114 [ NETDRV="$withval" ])
116 dnl substitute @DRVDIR@ in all Makefiles
117 AC_SUBST(NETDRV)
119 AC_SUBST(TENV)
120 AC_SUBST(PACKAGE_VERSION)
122 AC_PROG_YACC
123 AC_PROG_LEX
125 # basic build files
126 AC_CONFIG_FILES([
127 Makefile
128 ramdisk/Makefile
129 tests/Makefile
130 tests/_sanity/Makefile
131 tests/block-list/Makefile
132 tests/block-create/Makefile
133 tests/block-destroy/Makefile
134 tests/block-integrity/Makefile
135 tests/console/Makefile
136 tests/create/Makefile
137 tests/destroy/Makefile
138 tests/dmesg/Makefile
139 tests/domid/Makefile
140 tests/domname/Makefile
141 tests/help/Makefile
142 tests/info/Makefile
143 tests/list/Makefile
144 tests/memmax/Makefile
145 tests/memset/Makefile
146 tests/migrate/Makefile
147 tests/network-attach/Makefile
148 tests/network/Makefile
149 tests/pause/Makefile
150 tests/reboot/Makefile
151 tests/restore/Makefile
152 tests/save/Makefile
153 tests/sched-credit/Makefile
154 tests/security-acm/Makefile
155 tests/sedf/Makefile
156 tests/shutdown/Makefile
157 tests/sysrq/Makefile
158 tests/unpause/Makefile
159 tests/vcpu-pin/Makefile
160 tests/vcpu-disable/Makefile
161 tests/vtpm/Makefile
162 tests/xapi/Makefile
163 tests/enforce_dom0_cpus/Makefile
164 lib/XmTestReport/xmtest.py
165 lib/XmTestLib/config.py
166 ])
168 AC_OUTPUT
170 chmod a+x lib/XmTestReport/xmtest.py