From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Haxby Subject: Fix iptables failure test in vif-common.sh Date: Fri, 07 Aug 2009 13:34:00 +0100 Message-ID: <4A7C1F38.5060801@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060007020503040907090608" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060007020503040907090608 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 (Inline and attachment, I don't trust this thunderbird beta) diff -up xen-3.4.0/tools/hotplug/Linux/vif-common.sh.bug1490 xen-3.4.0/tools/hotplug/Linux/vif-common.sh --- xen-3.4.0/tools/hotplug/Linux/vif-common.sh.bug1490 2009-08-07 12:37:35.000000000 +0100 +++ xen-3.4.0/tools/hotplug/Linux/vif-common.sh 2009-08-07 12:39:58.000000000 +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 --------------060007020503040907090608 Content-Type: text/x-patch; name="bug1490.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug1490.patch" diff -up xen-3.4.0/tools/hotplug/Linux/vif-common.sh.bug8752713 xen-3.4.0/tools/hotplug/Linux/vif-common.sh --- xen-3.4.0/tools/hotplug/Linux/vif-common.sh.bug8752713 2009-08-07 12:37:35.000000000 +0100 +++ xen-3.4.0/tools/hotplug/Linux/vif-common.sh 2009-08-07 12:39:58.000000000 +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 --------------060007020503040907090608 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060007020503040907090608--