From dafa39adbc45e7d968287b10f8182ec3a537f81f Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 7 Mar 2014 17:07:33 +0000 Subject: [PATCH] Remove unused ebtablesRemoveForwardPolicyReject method The ebtablesRemoveForwardPolicyReject method was unused and would not do anything useful even if called. Signed-off-by: Daniel P. Berrange --- 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 25410a890e..01fb15e581 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 4a3fdff21f..749d8f721d 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__ */ -- GitLab