diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-31 03:54:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:54:29 -0400 |
commit | 14d5e834f6b36667c7da56374645f99b6cf30814 (patch) | |
tree | 14bfecb3f5b7eaeec508e8d069265a0583d6be9f /net/netfilter/nf_conntrack_irc.c | |
parent | 673d57e72398edfedc93fb50ff58048077c9d587 (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/nf_conntrack_irc.c')
-rw-r--r-- | net/netfilter/nf_conntrack_irc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 20633fdf7e6..4d681a04447 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c | |||
@@ -156,9 +156,9 @@ static int help(struct sk_buff *skb, unsigned int protoff, | |||
156 | /* we have at least (19+MINMATCHLEN)-5 bytes valid data left */ | 156 | /* we have at least (19+MINMATCHLEN)-5 bytes valid data left */ |
157 | 157 | ||
158 | iph = ip_hdr(skb); | 158 | iph = ip_hdr(skb); |
159 | pr_debug("DCC found in master %u.%u.%u.%u:%u %u.%u.%u.%u:%u\n", | 159 | pr_debug("DCC found in master %pI4:%u %pI4:%u\n", |
160 | NIPQUAD(iph->saddr), ntohs(th->source), | 160 | &iph->saddr, ntohs(th->source), |
161 | NIPQUAD(iph->daddr), ntohs(th->dest)); | 161 | &iph->daddr, ntohs(th->dest)); |
162 | 162 | ||
163 | for (i = 0; i < ARRAY_SIZE(dccprotos); i++) { | 163 | for (i = 0; i < ARRAY_SIZE(dccprotos); i++) { |
164 | if (memcmp(data, dccprotos[i], strlen(dccprotos[i]))) { | 164 | if (memcmp(data, dccprotos[i], strlen(dccprotos[i]))) { |
@@ -185,10 +185,9 @@ static int help(struct sk_buff *skb, unsigned int protoff, | |||
185 | tuple->dst.u3.ip != htonl(dcc_ip)) { | 185 | tuple->dst.u3.ip != htonl(dcc_ip)) { |
186 | if (net_ratelimit()) | 186 | if (net_ratelimit()) |
187 | printk(KERN_WARNING | 187 | printk(KERN_WARNING |
188 | "Forged DCC command from " | 188 | "Forged DCC command from %pI4: %pI4:%u\n", |
189 | "%u.%u.%u.%u: %u.%u.%u.%u:%u\n", | 189 | &tuple->src.u3.ip, |
190 | NIPQUAD(tuple->src.u3.ip), | 190 | &dcc_ip, dcc_port); |
191 | HIPQUAD(dcc_ip), dcc_port); | ||
192 | continue; | 191 | continue; |
193 | } | 192 | } |
194 | 193 | ||