diff options
author | Florian Westphal <fw@strlen.de> | 2018-11-03 23:43:49 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-11-07 20:08:15 +0100 |
commit | 7bd9febf65e98eb1f4b4d51afa2479c442066235 (patch) | |
tree | 016e65d6e7fc85cda5baa28837e8e0f2c2c93240 /extensions/libebt_arpreply.c | |
parent | a10eb8861c8fdc8894a8c2f6baf4dd791d5ab4f0 (diff) |
libxtables: add and use mac print helpers
This changes ebtables-nft to consistently print mac
address with two characters, i.e.
00:01:02:03:04:0a, not 0:1:2:3:4:a.
Will require another bump of vcurrent/vage.
Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'extensions/libebt_arpreply.c')
-rw-r--r-- | extensions/libebt_arpreply.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/extensions/libebt_arpreply.c b/extensions/libebt_arpreply.c index 998dece3..80ba2159 100644 --- a/extensions/libebt_arpreply.c +++ b/extensions/libebt_arpreply.c @@ -71,17 +71,12 @@ brarpreply_parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void ebt_print_mac(const unsigned char *mac) -{ - printf("%s", ether_ntoa((struct ether_addr *) mac)); -} - static void brarpreply_print(const void *ip, const struct xt_entry_target *t, int numeric) { struct ebt_arpreply_info *replyinfo = (void *)t->data; printf("--arpreply-mac "); - ebt_print_mac(replyinfo->mac); + xtables_print_mac(replyinfo->mac); if (replyinfo->target == EBT_DROP) return; printf(" --arpreply-target %s", ebt_target_name(replyinfo->target)); |