diff options
author | Phil Sutter <phil@nwl.cc> | 2018-08-23 17:43:28 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-24 10:05:51 +0200 |
commit | 4cf650c4276540a8405e53b3f29d759c080465b5 (patch) | |
tree | 0bd8271f413ccb50921c65d1610f99c43c58f88c /extensions/libxt_limit.c | |
parent | 783e9c2308e0c6a53482482cf7a6c75c975e23be (diff) |
ebtables-translate: Fix for libebt_limit.txlate
The xlate function sharing here does not quite work since in
ebtables-translate, extensions are supposed to append whitespace. Fix
this by introducing a simple wrapper.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libxt_limit.c')
-rw-r--r-- | extensions/libxt_limit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c index 124bda29..c7b66295 100644 --- a/extensions/libxt_limit.c +++ b/extensions/libxt_limit.c @@ -195,6 +195,14 @@ static int limit_xlate(struct xt_xlate *xl, return 1; } +static int limit_xlate_eb(struct xt_xlate *xl, + const struct xt_xlate_mt_params *params) +{ + limit_xlate(xl, params); + xt_xlate_add(xl, " "); + return 1; +} + #define FLAG_LIMIT 0x01 #define FLAG_LIMIT_BURST 0x02 #define ARG_LIMIT '1' @@ -276,7 +284,7 @@ static struct xtables_match limit_match[] = { .parse = brlimit_parse, .print = brlimit_print, .extra_opts = brlimit_opts, - .xlate = limit_xlate, + .xlate = limit_xlate_eb, }, }; |