]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
net: use newer iptables syntax v1.0.4-rc2
authorStefan Seyfried <seife@b1-systems.de>
Mon, 25 Mar 2013 19:39:40 +0000 (20:39 +0100)
committerEric Blake <eblake@redhat.com>
Wed, 27 Mar 2013 22:20:03 +0000 (16:20 -0600)
iptables-1.4.18 removed the long deprecated "state" match.
Use "conntrack" instead in forwarding rules.
Fixes openSUSE bug https://bugzilla.novell.com/811251 #811251.

src/util/viriptables.c

index 8cfafc0f173bac07aa207a3e024b1aa826dfdab0..19d61610c8c49d6d2d0d3ed62709d15d6f17354d 100644 (file)
@@ -480,8 +480,8 @@ iptablesForwardAllowRelatedIn(iptablesContext *ctx,
                                     "--destination", networkstr,
                                     "--in-interface", physdev,
                                     "--out-interface", iface,
-                                    "--match", "state",
-                                    "--state", "ESTABLISHED,RELATED",
+                                    "--match", "conntrack",
+                                    "--ctstate", "ESTABLISHED,RELATED",
                                     "--jump", "ACCEPT",
                                     NULL);
     } else {
@@ -490,8 +490,8 @@ iptablesForwardAllowRelatedIn(iptablesContext *ctx,
                                     action,
                                     "--destination", networkstr,
                                     "--out-interface", iface,
-                                    "--match", "state",
-                                    "--state", "ESTABLISHED,RELATED",
+                                    "--match", "conntrack",
+                                    "--ctstate", "ESTABLISHED,RELATED",
                                     "--jump", "ACCEPT",
                                     NULL);
     }