[PATCH 7/8] Remove unused ebtablesRemoveForwardPolicyReject method

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

 



The ebtablesRemoveForwardPolicyReject method was unused and
would not do anything useful even if called.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/util/virebtables.c | 28 ++++++----------------------
 src/util/virebtables.h |  2 --
 2 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/src/util/virebtables.c b/src/util/virebtables.c
index 25410a8..01fb15e 100644
--- a/src/util/virebtables.c
+++ b/src/util/virebtables.c
@@ -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
  */
diff --git a/src/util/virebtables.h b/src/util/virebtables.h
index 246d0dc..ba2a761 100644
--- a/src/util/virebtables.h
+++ b/src/util/virebtables.h
@@ -42,6 +42,4 @@ int              ebtablesRemoveForwardAllowIn    (ebtablesContext *ctx,
 
 int              ebtablesAddForwardPolicyReject(ebtablesContext *ctx);
 
-int              ebtablesRemoveForwardPolicyReject(ebtablesContext *ctx);
-
 #endif /* __QEMUD_ebtabLES_H__ */
-- 
1.8.5.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]