path: root/iptables/xshared.h
diff options
authorPhil Sutter <>2018-09-19 15:17:00 +0200
committerFlorian Westphal <>2018-09-24 11:24:17 +0200
commit80aae9b3b784ffdea3624117c548d500c56f24d9 (patch)
treef1f3ae0a9f8ed001f0f49ad8a0bce4f1cec6ff3e /iptables/xshared.h
parent8da04ffdca1931402a6bc22c43c1a2fa1c6f1e14 (diff)
iptables: Use print_ifaces() from xtables
Move the function to xshared.c for common use between legacy and xtables sources. While being at it, silence a covscan warning triggered by that function as it couldn't verify input buffers won't exceed IFNAMSIZ. Therefore use snprintf() when writing to the local buffer. Signed-off-by: Phil Sutter <> Signed-off-by: Florian Westphal <>
Diffstat (limited to 'iptables/xshared.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables/xshared.h b/iptables/xshared.h
index cb6f761d..ee0183c8 100644
--- a/iptables/xshared.h
+++ b/iptables/xshared.h
@@ -171,4 +171,7 @@ void add_param_to_argv(char *parsestart, int line);
void print_ipv4_addresses(const struct ipt_entry *fw, unsigned int format);
void print_ipv6_addresses(const struct ip6t_entry *fw6, unsigned int format);
+void print_ifaces(const char *iniface, const char *outiface, uint8_t invflags,
+ unsigned int format);