diff options
author | Phil Sutter <phil@nwl.cc> | 2021-09-27 16:59:49 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-10-20 11:32:54 +0200 |
commit | 6cf3976ef7f06b3892a111a3c187c6ca37dbc19e (patch) | |
tree | a53ca5ab6bfce21fb09f2fcf771bb11c623c8cb3 | |
parent | 832a0e2b838546f4266094fae29dd54c6cdeeb82 (diff) |
nft-shared: Make nft_check_xt_legacy() family agnostic
Of course there is no such thing as *_tables_names for ebtables, so no
legacy tables checking for ebtables-nft.
Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r-- | iptables/nft-shared.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index 4253b081..72727270 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -992,6 +992,7 @@ void nft_check_xt_legacy(int family, bool is_ipt_save) { static const char tables6[] = "/proc/net/ip6_tables_names"; static const char tables4[] = "/proc/net/ip_tables_names"; + static const char tablesa[] = "/proc/net/arp_tables_names"; const char *prefix = "ip"; FILE *fp = NULL; char buf[1024]; @@ -1004,6 +1005,10 @@ void nft_check_xt_legacy(int family, bool is_ipt_save) fp = fopen(tables6, "r"); prefix = "ip6"; break; + case NFPROTO_ARP: + fp = fopen(tablesa, "r"); + prefix = "arp"; + break; default: break; } |