From: Daniel P. Berrange Date: Fri, 7 Mar 2014 17:07:33 +0000 (+0000) Subject: Remove unused ebtablesRemoveForwardPolicyReject method X-Git-Tag: v1.2.3-rc1~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dafa39adbc45e7d968287b10f8182ec3a537f81f;p=thirdparty%2Flibvirt.git Remove unused ebtablesRemoveForwardPolicyReject method The ebtablesRemoveForwardPolicyReject method was unused and would not do anything useful even if called. Signed-off-by: Daniel P. Berrange --- 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__ */