diff options
| author | Zhongqiu Duan <dzq.aishenghu0@gmail.com> | 2025-03-19 14:20:53 +0000 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2025-03-19 16:02:28 +0100 |
| commit | c59d42a90b0d279955d5051c2306733bc01522f8 (patch) | |
| tree | 4875c04f9bad97a4c3e88bf329b6c0d75935556d /src/expr/nat.c | |
| parent | a7dfa49d34c76a420778a6fce2b5e7d85f0c8b1a (diff) | |
src: remove unused str2XXX helpers
After commit 80077787f8f2 ("src: remove json support"), these internal
functions are no longer used:
nftnl_str2hooknum
nftnl_str2ntoh
nftnl_str2cmp
str2ctkey
str2ctdir
str2exthdr_op
str2exthdr_type
str2meta_key
nftnl_str2nat
nftnl_str2range
str2rt_key
nftnl_str2hooknum
Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/expr/nat.c')
| -rw-r--r-- | src/expr/nat.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/expr/nat.c b/src/expr/nat.c index 3ce1aaf..f7e24cb 100644 --- a/src/expr/nat.c +++ b/src/expr/nat.c @@ -202,18 +202,6 @@ static inline const char *nat2str(uint16_t nat) } } -static inline int nftnl_str2nat(const char *nat) -{ - if (strcmp(nat, "snat") == 0) - return NFT_NAT_SNAT; - else if (strcmp(nat, "dnat") == 0) - return NFT_NAT_DNAT; - else { - errno = EINVAL; - return -1; - } -} - static int nftnl_expr_nat_snprintf(char *buf, size_t remain, uint32_t flags, const struct nftnl_expr *e) |
