[libvirt] PATCH: iptables.c: fix deprecated cmd syntax

default iptables rules uses deprecated cmdline syntax When using iptables-1.4.5 with libvirt warnings appear: debug : virRun:827 : Command stderr: Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`). simple patch against src/util/iptables.c fixes it.. Reference Bugzilla ID: 533775 -Steve diff -ur libvirt/src/util/iptables.c libvirt-ipt/src/util/iptables.c --- libvirt/src/util/iptables.c 2009-11-08 20:57:08.458909225 -0800 +++ libvirt-ipt/src/util/iptables.c 2009-11-08 21:19:48.554615398 -0800 @@ -1067,7 +1067,7 @@ return iptablesAddRemoveRule(ctx->nat_postrouting, action, "--source", network, - "--destination", "!", network, + "!", "--destination", network, "--out-interface", physdev, "--jump", "MASQUERADE", NULL); @@ -1075,7 +1075,7 @@ return iptablesAddRemoveRule(ctx->nat_postrouting, action, "--source", network, - "--destination", "!", network, + "!", "--destination", network, "--jump", "MASQUERADE", NULL); }

On Sun, Nov 15, 2009 at 06:55:17PM -0800, Steve Yarmie wrote:
default iptables rules uses deprecated cmdline syntax When using iptables-1.4.5 with libvirt warnings appear:
debug : virRun:827 : Command stderr: Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
simple patch against src/util/iptables.c fixes it..
Reference Bugzilla ID: 533775
diff -ur libvirt/src/util/iptables.c libvirt-ipt/src/util/iptables.c --- libvirt/src/util/iptables.c 2009-11-08 20:57:08.458909225 -0800 +++ libvirt-ipt/src/util/iptables.c 2009-11-08 21:19:48.554615398 -0800 @@ -1067,7 +1067,7 @@ return iptablesAddRemoveRule(ctx->nat_postrouting, action, "--source", network, - "--destination", "!", network, + "!", "--destination", network, "--out-interface", physdev, "--jump", "MASQUERADE", NULL); @@ -1075,7 +1075,7 @@ return iptablesAddRemoveRule(ctx->nat_postrouting, action, "--source", network, - "--destination", "!", network, + "!", "--destination", network, "--jump", "MASQUERADE", NULL); }
ACK, looks good Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Sun, Nov 15, 2009 at 06:55:17PM -0800, Steve Yarmie wrote:
default iptables rules uses deprecated cmdline syntax When using iptables-1.4.5 with libvirt warnings appear:
debug : virRun:827 : Command stderr: Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
simple patch against src/util/iptables.c fixes it..
Okay, applied, I hope this won't conflict with older installed versions ! thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Steve Yarmie