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>
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'
.parse = brlimit_parse,
.print = brlimit_print,
.extra_opts = brlimit_opts,
- .xlate = limit_xlate,
+ .xlate = limit_xlate_eb,
},
};