|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] Add default netmask to vif-nat
If vif-nat is passed an IP address "10.1.1.27" instead of "10.1.1.27/16",
bits is an empty string. This causes a syntax error on
line 89 while setting intmask, and another "Hotplug scripts not working"
error.
This patch adds a default value, though a case can be made for removing
intmask, vif_int, netmask, and network since they
don't seem to be used for anything.
Signed-off-by: Jim Dykman <dykman@xxxxxxxxxx>
diff -r c9772105fead tools/examples/vif-nat
--- a/tools/examples/vif-nat Thu Dec 8 15:04:41 2005
+++ b/tools/examples/vif-nat Thu Dec 8 13:47:08 2005
@@ -81,7 +81,9 @@
# Split the given IP/bits pair.
vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
-bits=`echo ${ip} | awk -F/ '{print $2}'`
+bits_or_nothing=`echo ${ip} | awk -F/ '{print $2}'`
+# Default to /24
+bits=${bits_or_nothing:-24}
# Convert $bits and $vif_ip to integers, mask appropriately to get a
network
# address, and convert them both to dotted quads.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] Add default netmask to vif-nat,
James Dykman <=
|
|
|
|
|