From: John Haxby <john.haxby@oracle.com>
To: "Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>
Subject: Fix iptables failure test in vif-common.sh
Date: Fri, 07 Aug 2009 13:34:00 +0100 [thread overview]
Message-ID: <4A7C1F38.5060801@oracle.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
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@oracle.com>
(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
[-- Attachment #2: bug1490.patch --]
[-- Type: text/x-patch, Size: 619 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2009-08-07 12:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7C1F38.5060801@oracle.com \
--to=john.haxby@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.