summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_iprange.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-31 00:54:29 -0700
committerDavid S. Miller <davem@davemloft.net>2008-10-31 00:54:29 -0700
commit14d5e834f6b36667c7da56374645f99b6cf30814 (patch)
tree14bfecb3f5b7eaeec508e8d069265a0583d6be9f /net/netfilter/xt_iprange.c
parent673d57e72398edfedc93fb50ff58048077c9d587 (diff)
net: replace NIPQUAD() in net/netfilter/
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_iprange.c')
-rw-r--r--net/netfilter/xt_iprange.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/net/netfilter/xt_iprange.c b/net/netfilter/xt_iprange.c
index 7ac54eab0b00..501f9b623188 100644
--- a/net/netfilter/xt_iprange.c
+++ b/net/netfilter/xt_iprange.c
@@ -26,12 +26,11 @@ iprange_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par)
if ((ntohl(iph->saddr) < ntohl(info->src.min_ip)
|| ntohl(iph->saddr) > ntohl(info->src.max_ip))
^ !!(info->flags & IPRANGE_SRC_INV)) {
- pr_debug("src IP %u.%u.%u.%u NOT in range %s"
- "%u.%u.%u.%u-%u.%u.%u.%u\n",
- NIPQUAD(iph->saddr),
+ pr_debug("src IP %pI4 NOT in range %s%pI4-%pI4\n",
+ &iph->saddr,
info->flags & IPRANGE_SRC_INV ? "(INV) " : "",
- NIPQUAD(info->src.min_ip),
- NIPQUAD(info->src.max_ip));
+ &info->src.min_ip,
+ &info->src.max_ip);
return false;
}
}
@@ -39,12 +38,11 @@ iprange_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par)
if ((ntohl(iph->daddr) < ntohl(info->dst.min_ip)
|| ntohl(iph->daddr) > ntohl(info->dst.max_ip))
^ !!(info->flags & IPRANGE_DST_INV)) {
- pr_debug("dst IP %u.%u.%u.%u NOT in range %s"
- "%u.%u.%u.%u-%u.%u.%u.%u\n",
- NIPQUAD(iph->daddr),
+ pr_debug("dst IP %pI4 NOT in range %s%pI4-%pI4\n",
+ &iph->daddr,
info->flags & IPRANGE_DST_INV ? "(INV) " : "",
- NIPQUAD(info->dst.min_ip),
- NIPQUAD(info->dst.max_ip));
+ &info->dst.min_ip,
+ &info->dst.max_ip);
return false;
}
}
@@ -63,12 +61,11 @@ iprange_mt4(const struct sk_buff *skb, const struct xt_match_param *par)
m |= ntohl(iph->saddr) > ntohl(info->src_max.ip);
m ^= !!(info->flags & IPRANGE_SRC_INV);
if (m) {
- pr_debug("src IP " NIPQUAD_FMT " NOT in range %s"
- NIPQUAD_FMT "-" NIPQUAD_FMT "\n",
- NIPQUAD(iph->saddr),
+ pr_debug("src IP %pI4 NOT in range %s%pI4-%pI4\n",
+ &iph->saddr,
(info->flags & IPRANGE_SRC_INV) ? "(INV) " : "",
- NIPQUAD(info->src_max.ip),
- NIPQUAD(info->src_max.ip));
+ &info->src_max.ip,
+ &info->src_max.ip);
return false;
}
}
@@ -77,12 +74,11 @@ iprange_mt4(const struct sk_buff *skb, const struct xt_match_param *par)
m |= ntohl(iph->daddr) > ntohl(info->dst_max.ip);
m ^= !!(info->flags & IPRANGE_DST_INV);
if (m) {
- pr_debug("dst IP " NIPQUAD_FMT " NOT in range %s"
- NIPQUAD_FMT "-" NIPQUAD_FMT "\n",
- NIPQUAD(iph->daddr),
+ pr_debug("dst IP %pI4 NOT in range %s%pI4-%pI4\n",
+ &iph->daddr,
(info->flags & IPRANGE_DST_INV) ? "(INV) " : "",
- NIPQUAD(info->dst_min.ip),
- NIPQUAD(info->dst_max.ip));
+ &info->dst_min.ip,
+ &info->dst_max.ip);
return false;
}
}