summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_iprange.c
diff options
context:
space:
mode:
authorPablo M. Bermudo Garay <pablombg@gmail.com>2016-06-20 12:24:56 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-06-22 19:58:51 +0200
commit34c6f774f6981f4ef909495f366b58c1b646cf4b (patch)
tree133c530cc42a83fe704aabc580ec8708c1653b98 /extensions/libxt_iprange.c
parent97842738468fca3653bb41ee7fee77032dfce9a9 (diff)
extensions: iprange: remove extra space in translation
Extra space was printed by iprange_xlate: # iptables-translate -A INPUT -m iprange --src-range \ 192.168.25.149-192.168.25.151 -j ACCEPT nft add rule ip filter INPUT ip saddr 192.168.25.149-192.168.25... ^^ Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libxt_iprange.c')
-rw-r--r--extensions/libxt_iprange.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/extensions/libxt_iprange.c b/extensions/libxt_iprange.c
index c2d51e9b..8da7de1c 100644
--- a/extensions/libxt_iprange.c
+++ b/extensions/libxt_iprange.c
@@ -322,14 +322,14 @@ static int iprange_xlate(const void *ip, const struct xt_entry_match *match,
if (info->flags & IPRANGE_SRC) {
if (info->flags & IPRANGE_SRC_INV)
- xt_xlate_add(xl, " !=");
- xt_xlate_add(xl, " ip saddr");
+ xt_xlate_add(xl, "!= ");
+ xt_xlate_add(xl, "ip saddr");
print_iprange_xlate(&info->src, xl);
}
if (info->flags & IPRANGE_DST) {
if (info->flags & IPRANGE_DST_INV)
- xt_xlate_add(xl, " !=");
- xt_xlate_add(xl, " ip daddr");
+ xt_xlate_add(xl, "!= ");
+ xt_xlate_add(xl, "ip daddr");
print_iprange_xlate(&info->dst, xl);
}
@@ -343,16 +343,16 @@ static int iprange_mt4_xlate(const void *ip, const struct xt_entry_match *match,
if (info->flags & IPRANGE_SRC) {
if (info->flags & IPRANGE_SRC_INV)
- xt_xlate_add(xl, " !=");
- xt_xlate_add(xl, " ip saddr %s",
+ xt_xlate_add(xl, "!= ");
+ xt_xlate_add(xl, "ip saddr %s",
xtables_ipaddr_to_numeric(&info->src_min.in));
xt_xlate_add(xl, "-%s ",
xtables_ipaddr_to_numeric(&info->src_max.in));
}
if (info->flags & IPRANGE_DST) {
if (info->flags & IPRANGE_DST_INV)
- xt_xlate_add(xl, " !=");
- xt_xlate_add(xl, " ip daddr %s",
+ xt_xlate_add(xl, "!= ");
+ xt_xlate_add(xl, "ip daddr %s",
xtables_ipaddr_to_numeric(&info->dst_min.in));
xt_xlate_add(xl, "-%s ",
xtables_ipaddr_to_numeric(&info->dst_max.in));
@@ -368,16 +368,16 @@ static int iprange_mt6_xlate(const void *ip, const struct xt_entry_match *match,
if (info->flags & IPRANGE_SRC) {
if (info->flags & IPRANGE_SRC_INV)
- xt_xlate_add(xl, " !=");
- xt_xlate_add(xl, " ip saddr %s",
+ xt_xlate_add(xl, "!= ");
+ xt_xlate_add(xl, "ip saddr %s",
xtables_ip6addr_to_numeric(&info->src_min.in6));
xt_xlate_add(xl, "-%s ",
xtables_ip6addr_to_numeric(&info->src_max.in6));
}
if (info->flags & IPRANGE_DST) {
if (info->flags & IPRANGE_DST_INV)
- xt_xlate_add(xl, " !=");
- xt_xlate_add(xl, " ip daddr %s",
+ xt_xlate_add(xl, "!= ");
+ xt_xlate_add(xl, "ip daddr %s",
xtables_ip6addr_to_numeric(&info->dst_min.in6));
xt_xlate_add(xl, "-%s ",
xtables_ip6addr_to_numeric(&info->dst_max.in6));