]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Remove unused ebtablesRemoveForwardPolicyReject method
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 7 Mar 2014 17:07:33 +0000 (17:07 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 11 Mar 2014 11:01:52 +0000 (11:01 +0000)
The ebtablesRemoveForwardPolicyReject method was unused and
would not do anything useful even if called.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/virebtables.c
src/util/virebtables.h

index 25410a890e7fdd782c4b4a1c2440f5495ca9e642..01fb15e5812103629adb29f87bcf9b9ab710e0fb 100644 (file)
@@ -210,35 +210,19 @@ ebtablesContextFree(ebtablesContext *ctx)
     VIR_FREE(ctx);
 }
 
-static int
-ebtablesForwardPolicyReject(ebtablesContext *ctx,
-                            int action)
-{
-    /* create it, if it does not exist */
-    if (action == ADD) {
-        ebtablesAddRemoveRule("--new-chain", ctx->chain, NULL,
-                              NULL);
-        ebtablesAddRemoveRule("--insert", "FORWARD", "--jump",
-                              ctx->chain, NULL);
-    }
-
-    return ebtablesAddRemoveRule("-P", ctx->chain, "DROP",
-                                 NULL);
-}
 
 int
 ebtablesAddForwardPolicyReject(ebtablesContext *ctx)
 {
-    return ebtablesForwardPolicyReject(ctx, ADD);
+    ebtablesAddRemoveRule("--new-chain", ctx->chain, NULL,
+                          NULL);
+    ebtablesAddRemoveRule("--insert", "FORWARD", "--jump",
+                          ctx->chain, NULL);
+    return ebtablesAddRemoveRule("-P", ctx->chain, "DROP",
+                                 NULL);
 }
 
 
-int
-ebtablesRemoveForwardPolicyReject(ebtablesContext *ctx)
-{
-    return ebtablesForwardPolicyReject(ctx, REMOVE);
-}
-
 /*
  * Allow all traffic destined to the bridge, with a valid network address
  */
index 4a3fdff21f864d5e4786650edc03219687aac6a5..749d8f721db66fedcafeafa5bc515e5392c9bec0 100644 (file)
@@ -42,6 +42,4 @@ int              ebtablesRemoveForwardAllowIn    (ebtablesContext *ctx,
 
 int              ebtablesAddForwardPolicyReject(ebtablesContext *ctx);
 
-int              ebtablesRemoveForwardPolicyReject(ebtablesContext *ctx);
-
 #endif /* __QEMUD_ebtabLES_H__ */