[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools: Fix iptables failure test in vif-common.sh



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1249662687 -3600
# Node ID 57033bc8cd3007f4ba2a75b890be09b3be90952d
# Parent  5998795faa6e4f7d5128e231b6ed5a5849f638db
tools: Fix iptables failure test in vif-common.sh

In changset 19540 a bug was introduced in the fib_iptable function in
vif-common.sh that incorrectly checks the exit status of iptables --
it always believes iptables has failed even when it hasn't.

The attached patch fixes that.  It's also bug 1490.

Signed-off-by: John Haxby <john.haxby@xxxxxxxxxx>
---
 tools/hotplug/Linux/vif-common.sh |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 5998795faa6e -r 57033bc8cd30 tools/hotplug/Linux/vif-common.sh
--- a/tools/hotplug/Linux/vif-common.sh Fri Aug 07 17:30:33 2009 +0100
+++ b/tools/hotplug/Linux/vif-common.sh Fri Aug 07 17:31:27 2009 +0100
@@ -78,7 +78,7 @@ frob_iptable()
   iptables "$c" FORWARD -m state --state RELATED,ESTABLISHED -m physdev \
     --physdev-out "$vif" -j ACCEPT 2>/dev/null
 
-  if [ "$command" == "online" ] && [ $? ]
+  if [ "$command" == "online" -a $? -ne 0 ]
   then
     log err "iptables setup failed. This may affect guest networking."
   fi

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.