mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Don't use abbreviated ip subcommands -- these are not accepted by iproute2.
Closes bug #478. Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
a638cd3e89
commit
26c829aa89
2 files changed
+10
-3
No files matched your search
@@ -24,6 +24,13 @@ Gentoo doesn't have ifup/ifdown; appropriate alternatives are defined in
|
||||
xen-network-common.sh.
|
||||
|
||||
|
||||
ip
|
||||
--
|
||||
|
||||
Newer ip commands (from iproute2) do not accept the abbreviated syntax "ip r a
|
||||
..." etc. "ip route add ..." must be used instead.
|
||||
|
||||
|
||||
sed
|
||||
---
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@ case "$command" in
|
||||
online)
|
||||
ifconfig ${vif} ${main_ip} netmask 255.255.255.255 up
|
||||
echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
|
||||
ipcmd='a'
|
||||
ipcmd='add'
|
||||
;;
|
||||
offline)
|
||||
ifdown ${vif}
|
||||
ipcmd='d'
|
||||
ipcmd='del'
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -41,7 +41,7 @@ if [ "${ip}" ] ; then
|
||||
# If we've been given a list of IP addresses, then add routes from dom0 to
|
||||
# the guest using those addresses.
|
||||
for addr in ${ip} ; do
|
||||
ip r ${ipcmd} ${addr} dev ${vif} src ${main_ip}
|
||||
ip route ${ipcmd} ${addr} dev ${vif} src ${main_ip}
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||