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

[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);
     }

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