aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-28 19:08:13 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-28 19:08:13 -0400
commit38ff4fa49bef77e86b21d95d9ce341a098f02839 (patch)
tree9c1b370a8d81410296719325a9b8264200e1af72 /net
parent1afa67f5e70b4733d5b237df61e6d639af6283bb (diff)
netfilter: replace uses of NIP6_FMT with %p6
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c20
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c8
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c8
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c19
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_ah_esp.c5
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c17
-rw-r--r--net/netfilter/nf_conntrack_ftp.c8
-rw-r--r--net/netfilter/nf_conntrack_h323_main.c12
-rw-r--r--net/netfilter/xt_hashlimit.c7
-rw-r--r--net/netfilter/xt_recent.c5
10 files changed, 45 insertions, 64 deletions
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index 9a24332fbed8..89bf65be6f2c 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -820,13 +820,11 @@ static int ip_vs_conn_seq_show(struct seq_file *seq, void *v)
820 820
821#ifdef CONFIG_IP_VS_IPV6 821#ifdef CONFIG_IP_VS_IPV6
822 if (cp->af == AF_INET6) 822 if (cp->af == AF_INET6)
823 seq_printf(seq, 823 seq_printf(seq, "%-3s %p6 %04X %p6 %04X %p6 %04X %-11s %7lu\n",
824 "%-3s " NIP6_FMT " %04X " NIP6_FMT
825 " %04X " NIP6_FMT " %04X %-11s %7lu\n",
826 ip_vs_proto_name(cp->protocol), 824 ip_vs_proto_name(cp->protocol),
827 NIP6(cp->caddr.in6), ntohs(cp->cport), 825 &cp->caddr.in6, ntohs(cp->cport),
828 NIP6(cp->vaddr.in6), ntohs(cp->vport), 826 &cp->vaddr.in6, ntohs(cp->vport),
829 NIP6(cp->daddr.in6), ntohs(cp->dport), 827 &cp->daddr.in6, ntohs(cp->dport),
830 ip_vs_state_name(cp->protocol, cp->state), 828 ip_vs_state_name(cp->protocol, cp->state),
831 (cp->timer.expires-jiffies)/HZ); 829 (cp->timer.expires-jiffies)/HZ);
832 else 830 else
@@ -883,13 +881,11 @@ static int ip_vs_conn_sync_seq_show(struct seq_file *seq, void *v)
883 881
884#ifdef CONFIG_IP_VS_IPV6 882#ifdef CONFIG_IP_VS_IPV6
885 if (cp->af == AF_INET6) 883 if (cp->af == AF_INET6)
886 seq_printf(seq, 884 seq_printf(seq, "%-3s %p6 %04X %p6 %04X %p6 %04X %-11s %-6s %7lu\n",
887 "%-3s " NIP6_FMT " %04X " NIP6_FMT
888 " %04X " NIP6_FMT " %04X %-11s %-6s %7lu\n",
889 ip_vs_proto_name(cp->protocol), 885 ip_vs_proto_name(cp->protocol),
890 NIP6(cp->caddr.in6), ntohs(cp->cport), 886 &cp->caddr.in6, ntohs(cp->cport),
891 NIP6(cp->vaddr.in6), ntohs(cp->vport), 887 &cp->vaddr.in6, ntohs(cp->vport),
892 NIP6(cp->daddr.in6), ntohs(cp->dport), 888 &cp->daddr.in6, ntohs(cp->dport),
893 ip_vs_state_name(cp->protocol, cp->state), 889 ip_vs_state_name(cp->protocol, cp->state),
894 ip_vs_origin_name(cp->flags), 890 ip_vs_origin_name(cp->flags),
895 (cp->timer.expires-jiffies)/HZ); 891 (cp->timer.expires-jiffies)/HZ);
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 958abf3e5f8c..9400587a01e7 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -805,9 +805,9 @@ static int ip_vs_out_icmp_v6(struct sk_buff *skb, int *related)
805 if (ic == NULL) 805 if (ic == NULL)
806 return NF_DROP; 806 return NF_DROP;
807 807
808 IP_VS_DBG(12, "Outgoing ICMPv6 (%d,%d) " NIP6_FMT "->" NIP6_FMT "\n", 808 IP_VS_DBG(12, "Outgoing ICMPv6 (%d,%d) %p6->%p6\n",
809 ic->icmp6_type, ntohs(icmpv6_id(ic)), 809 ic->icmp6_type, ntohs(icmpv6_id(ic)),
810 NIP6(iph->saddr), NIP6(iph->daddr)); 810 &iph->saddr, &iph->daddr);
811 811
812 /* 812 /*
813 * Work through seeing if this is for us. 813 * Work through seeing if this is for us.
@@ -1175,9 +1175,9 @@ ip_vs_in_icmp_v6(struct sk_buff *skb, int *related, unsigned int hooknum)
1175 if (ic == NULL) 1175 if (ic == NULL)
1176 return NF_DROP; 1176 return NF_DROP;
1177 1177
1178 IP_VS_DBG(12, "Incoming ICMPv6 (%d,%d) " NIP6_FMT "->" NIP6_FMT "\n", 1178 IP_VS_DBG(12, "Incoming ICMPv6 (%d,%d) %p6->%p6\n",
1179 ic->icmp6_type, ntohs(icmpv6_id(ic)), 1179 ic->icmp6_type, ntohs(icmpv6_id(ic)),
1180 NIP6(iph->saddr), NIP6(iph->daddr)); 1180 &iph->saddr, &iph->daddr);
1181 1181
1182 /* 1182 /*
1183 * Work through seeing if this is for us. 1183 * Work through seeing if this is for us.
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 0302cf3e5039..28c47c0d5142 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1867,9 +1867,9 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
1867 if (iter->table == ip_vs_svc_table) { 1867 if (iter->table == ip_vs_svc_table) {
1868#ifdef CONFIG_IP_VS_IPV6 1868#ifdef CONFIG_IP_VS_IPV6
1869 if (svc->af == AF_INET6) 1869 if (svc->af == AF_INET6)
1870 seq_printf(seq, "%s [" NIP6_FMT "]:%04X %s ", 1870 seq_printf(seq, "%s [%p6]:%04X %s ",
1871 ip_vs_proto_name(svc->protocol), 1871 ip_vs_proto_name(svc->protocol),
1872 NIP6(svc->addr.in6), 1872 &svc->addr.in6,
1873 ntohs(svc->port), 1873 ntohs(svc->port),
1874 svc->scheduler->name); 1874 svc->scheduler->name);
1875 else 1875 else
@@ -1895,9 +1895,9 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
1895#ifdef CONFIG_IP_VS_IPV6 1895#ifdef CONFIG_IP_VS_IPV6
1896 if (dest->af == AF_INET6) 1896 if (dest->af == AF_INET6)
1897 seq_printf(seq, 1897 seq_printf(seq,
1898 " -> [" NIP6_FMT "]:%04X" 1898 " -> [%p6]:%04X"
1899 " %-7s %-6d %-10d %-10d\n", 1899 " %-7s %-6d %-10d %-10d\n",
1900 NIP6(dest->addr.in6), 1900 &dest->addr.in6,
1901 ntohs(dest->port), 1901 ntohs(dest->port),
1902 ip_vs_fwd_name(atomic_read(&dest->conn_flags)), 1902 ip_vs_fwd_name(atomic_read(&dest->conn_flags)),
1903 atomic_read(&dest->weight), 1903 atomic_read(&dest->weight),
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 0791f9e08feb..d7ce4f1839c9 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -203,26 +203,21 @@ ip_vs_tcpudp_debug_packet_v6(struct ip_vs_protocol *pp,
203 if (ih == NULL) 203 if (ih == NULL)
204 sprintf(buf, "%s TRUNCATED", pp->name); 204 sprintf(buf, "%s TRUNCATED", pp->name);
205 else if (ih->nexthdr == IPPROTO_FRAGMENT) 205 else if (ih->nexthdr == IPPROTO_FRAGMENT)
206 sprintf(buf, "%s " NIP6_FMT "->" NIP6_FMT " frag", 206 sprintf(buf, "%s %p6->%p6 frag",
207 pp->name, NIP6(ih->saddr), 207 pp->name, &ih->saddr, &ih->daddr);
208 NIP6(ih->daddr));
209 else { 208 else {
210 __be16 _ports[2], *pptr; 209 __be16 _ports[2], *pptr;
211 210
212 pptr = skb_header_pointer(skb, offset + sizeof(struct ipv6hdr), 211 pptr = skb_header_pointer(skb, offset + sizeof(struct ipv6hdr),
213 sizeof(_ports), _ports); 212 sizeof(_ports), _ports);
214 if (pptr == NULL) 213 if (pptr == NULL)
215 sprintf(buf, "%s TRUNCATED " NIP6_FMT "->" NIP6_FMT, 214 sprintf(buf, "%s TRUNCATED %p6->%p6",
216 pp->name, 215 pp->name, &ih->saddr, &ih->daddr);
217 NIP6(ih->saddr),
218 NIP6(ih->daddr));
219 else 216 else
220 sprintf(buf, "%s " NIP6_FMT ":%u->" NIP6_FMT ":%u", 217 sprintf(buf, "%s %p6:%u->%p6:%u",
221 pp->name, 218 pp->name,
222 NIP6(ih->saddr), 219 &ih->saddr, ntohs(pptr[0]),
223 ntohs(pptr[0]), 220 &ih->daddr, ntohs(pptr[1]));
224 NIP6(ih->daddr),
225 ntohs(pptr[1]));
226 } 221 }
227 222
228 printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf); 223 printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf);
diff --git a/net/netfilter/ipvs/ip_vs_proto_ah_esp.c b/net/netfilter/ipvs/ip_vs_proto_ah_esp.c
index 80ab0c8e5b4a..59f2d11b683e 100644
--- a/net/netfilter/ipvs/ip_vs_proto_ah_esp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_ah_esp.c
@@ -154,9 +154,8 @@ ah_esp_debug_packet_v6(struct ip_vs_protocol *pp, const struct sk_buff *skb,
154 if (ih == NULL) 154 if (ih == NULL)
155 sprintf(buf, "%s TRUNCATED", pp->name); 155 sprintf(buf, "%s TRUNCATED", pp->name);
156 else 156 else
157 sprintf(buf, "%s " NIP6_FMT "->" NIP6_FMT, 157 sprintf(buf, "%s %p6->%p6",
158 pp->name, NIP6(ih->saddr), 158 pp->name, &ih->saddr, &ih->daddr);
159 NIP6(ih->daddr));
160 159
161 printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf); 160 printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf);
162} 161}
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index 02ddc2b3ce2e..be34c335cabe 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -141,14 +141,13 @@ __ip_vs_get_out_rt_v6(struct ip_vs_conn *cp)
141 NULL, &fl); 141 NULL, &fl);
142 if (!rt) { 142 if (!rt) {
143 spin_unlock(&dest->dst_lock); 143 spin_unlock(&dest->dst_lock);
144 IP_VS_DBG_RL("ip6_route_output error, " 144 IP_VS_DBG_RL("ip6_route_output error, dest: %p6\n",
145 "dest: " NIP6_FMT "\n", 145 &dest->addr.in6);
146 NIP6(dest->addr.in6));
147 return NULL; 146 return NULL;
148 } 147 }
149 __ip_vs_dst_set(dest, 0, dst_clone(&rt->u.dst)); 148 __ip_vs_dst_set(dest, 0, dst_clone(&rt->u.dst));
150 IP_VS_DBG(10, "new dst " NIP6_FMT ", refcnt=%d\n", 149 IP_VS_DBG(10, "new dst %p6, refcnt=%d\n",
151 NIP6(dest->addr.in6), 150 &dest->addr.in6,
152 atomic_read(&rt->u.dst.__refcnt)); 151 atomic_read(&rt->u.dst.__refcnt));
153 } 152 }
154 spin_unlock(&dest->dst_lock); 153 spin_unlock(&dest->dst_lock);
@@ -167,8 +166,8 @@ __ip_vs_get_out_rt_v6(struct ip_vs_conn *cp)
167 166
168 rt = (struct rt6_info *)ip6_route_output(&init_net, NULL, &fl); 167 rt = (struct rt6_info *)ip6_route_output(&init_net, NULL, &fl);
169 if (!rt) { 168 if (!rt) {
170 IP_VS_DBG_RL("ip6_route_output error, dest: " 169 IP_VS_DBG_RL("ip6_route_output error, dest: %p6\n",
171 NIP6_FMT "\n", NIP6(cp->daddr.in6)); 170 &cp->daddr.in6);
172 return NULL; 171 return NULL;
173 } 172 }
174 } 173 }
@@ -301,8 +300,8 @@ ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
301 300
302 rt = (struct rt6_info *)ip6_route_output(&init_net, NULL, &fl); 301 rt = (struct rt6_info *)ip6_route_output(&init_net, NULL, &fl);
303 if (!rt) { 302 if (!rt) {
304 IP_VS_DBG_RL("ip_vs_bypass_xmit_v6(): ip6_route_output error, " 303 IP_VS_DBG_RL("ip_vs_bypass_xmit_v6(): ip6_route_output error, dest: %p6\n",
305 "dest: " NIP6_FMT "\n", NIP6(iph->daddr)); 304 &iph->daddr);
306 goto tx_error_icmp; 305 goto tx_error_icmp;
307 } 306 }
308 307
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index 4f7107107e99..05bf82d345ce 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -467,11 +467,9 @@ static int help(struct sk_buff *skb,
467 NIPQUAD(cmd.u3.ip), 467 NIPQUAD(cmd.u3.ip),
468 NIPQUAD(ct->tuplehash[dir].tuple.src.u3.ip)); 468 NIPQUAD(ct->tuplehash[dir].tuple.src.u3.ip));
469 } else { 469 } else {
470 pr_debug("conntrack_ftp: NOT RECORDING: " NIP6_FMT 470 pr_debug("conntrack_ftp: NOT RECORDING: %p6 != %p6\n",
471 " != " NIP6_FMT "\n", 471 cmd.u3.ip6,
472 NIP6(*((struct in6_addr *)cmd.u3.ip6)), 472 ct->tuplehash[dir].tuple.src.u3.ip6);
473 NIP6(*((struct in6_addr *)
474 ct->tuplehash[dir].tuple.src.u3.ip6)));
475 } 473 }
476 474
477 /* Thanks to Cristiano Lincoln Mattos 475 /* Thanks to Cristiano Lincoln Mattos
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index c1504f71cdff..29e49b1c80b3 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -850,10 +850,8 @@ static int process_setup(struct sk_buff *skb, struct nf_conn *ct,
850 get_h225_addr(ct, *data, &setup->destCallSignalAddress, 850 get_h225_addr(ct, *data, &setup->destCallSignalAddress,
851 &addr, &port) && 851 &addr, &port) &&
852 memcmp(&addr, &ct->tuplehash[!dir].tuple.src.u3, sizeof(addr))) { 852 memcmp(&addr, &ct->tuplehash[!dir].tuple.src.u3, sizeof(addr))) {
853 pr_debug("nf_ct_q931: set destCallSignalAddress " 853 pr_debug("nf_ct_q931: set destCallSignalAddress %p6:%hu->%p6:%hu\n",
854 NIP6_FMT ":%hu->" NIP6_FMT ":%hu\n", 854 &addr, ntohs(port), &ct->tuplehash[!dir].tuple.src.u3,
855 NIP6(*(struct in6_addr *)&addr), ntohs(port),
856 NIP6(*(struct in6_addr *)&ct->tuplehash[!dir].tuple.src.u3),
857 ntohs(ct->tuplehash[!dir].tuple.src.u.tcp.port)); 855 ntohs(ct->tuplehash[!dir].tuple.src.u.tcp.port));
858 ret = set_h225_addr(skb, data, dataoff, 856 ret = set_h225_addr(skb, data, dataoff,
859 &setup->destCallSignalAddress, 857 &setup->destCallSignalAddress,
@@ -868,10 +866,8 @@ static int process_setup(struct sk_buff *skb, struct nf_conn *ct,
868 get_h225_addr(ct, *data, &setup->sourceCallSignalAddress, 866 get_h225_addr(ct, *data, &setup->sourceCallSignalAddress,
869 &addr, &port) && 867 &addr, &port) &&
870 memcmp(&addr, &ct->tuplehash[!dir].tuple.dst.u3, sizeof(addr))) { 868 memcmp(&addr, &ct->tuplehash[!dir].tuple.dst.u3, sizeof(addr))) {
871 pr_debug("nf_ct_q931: set sourceCallSignalAddress " 869 pr_debug("nf_ct_q931: set sourceCallSignalAddress %p6:%hu->%p6:%hu\n",
872 NIP6_FMT ":%hu->" NIP6_FMT ":%hu\n", 870 &addr, ntohs(port), &ct->tuplehash[!dir].tuple.dst.u3,
873 NIP6(*(struct in6_addr *)&addr), ntohs(port),
874 NIP6(*(struct in6_addr *)&ct->tuplehash[!dir].tuple.dst.u3),
875 ntohs(ct->tuplehash[!dir].tuple.dst.u.tcp.port)); 871 ntohs(ct->tuplehash[!dir].tuple.dst.u.tcp.port));
876 ret = set_h225_addr(skb, data, dataoff, 872 ret = set_h225_addr(skb, data, dataoff,
877 &setup->sourceCallSignalAddress, 873 &setup->sourceCallSignalAddress,
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 6fc4292d46e6..f04c6ed43674 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -904,12 +904,11 @@ static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family,
904 ent->rateinfo.cost); 904 ent->rateinfo.cost);
905#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 905#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
906 case NFPROTO_IPV6: 906 case NFPROTO_IPV6:
907 return seq_printf(s, "%ld " NIP6_FMT ":%u->" 907 return seq_printf(s, "%ld %p6:%u->%p6:%u %u %u %u\n",
908 NIP6_FMT ":%u %u %u %u\n",
909 (long)(ent->expires - jiffies)/HZ, 908 (long)(ent->expires - jiffies)/HZ,
910 NIP6(*(struct in6_addr *)&ent->dst.ip6.src), 909 &ent->dst.ip6.src,
911 ntohs(ent->dst.src_port), 910 ntohs(ent->dst.src_port),
912 NIP6(*(struct in6_addr *)&ent->dst.ip6.dst), 911 &ent->dst.ip6.dst,
913 ntohs(ent->dst.dst_port), 912 ntohs(ent->dst.dst_port),
914 ent->rateinfo.credit, ent->rateinfo.credit_cap, 913 ent->rateinfo.credit, ent->rateinfo.credit_cap,
915 ent->rateinfo.cost); 914 ent->rateinfo.cost);
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
index 280c471bcdf4..a377ea333e16 100644
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -426,9 +426,8 @@ static int recent_seq_show(struct seq_file *seq, void *v)
426 "oldest_pkt: %u", NIPQUAD(e->addr.ip), e->ttl, 426 "oldest_pkt: %u", NIPQUAD(e->addr.ip), e->ttl,
427 e->stamps[i], e->index); 427 e->stamps[i], e->index);
428 else 428 else
429 seq_printf(seq, "src=" NIP6_FMT " ttl: %u last_seen: %lu " 429 seq_printf(seq, "src=%p6 ttl: %u last_seen: %lu oldest_pkt: %u",
430 "oldest_pkt: %u", NIP6(e->addr.in6), e->ttl, 430 &e->addr.in6, e->ttl, e->stamps[i], e->index);
431 e->stamps[i], e->index);
432 for (i = 0; i < e->nstamps; i++) 431 for (i = 0; i < e->nstamps; i++)
433 seq_printf(seq, "%s %lu", i ? "," : "", e->stamps[i]); 432 seq_printf(seq, "%s %lu", i ? "," : "", e->stamps[i]);
434 seq_printf(seq, "\n"); 433 seq_printf(seq, "\n");