aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2006-01-13 17:29:07 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-13 17:29:07 -0500
commit46b86a2da0fd14bd49765330df63a62279833acb (patch)
tree069b4741a970db9b03772a870b4d63398b1f56e0 /net/ipv6
parent23b0ca5bf52cef0ab0f0fe247cb91cbef836e7eb (diff)
[NET]: Use NIP6_FMT in kernel.h
There are errors and inconsistency in the display of NIP6 strings. ie: net/ipv6/ip6_flowlabel.c There are errors and inconsistency in the display of NIPQUAD strings too. ie: net/netfilter/nf_conntrack_ftp.c This patch: adds NIP6_FMT to kernel.h changes all code to use NIP6_FMT fixes net/ipv6/ip6_flowlabel.c adds NIPQUAD_FMT to kernel.h fixes net/netfilter/nf_conntrack_ftp.c changes a few uses of "%u.%u.%u.%u" to NIPQUAD_FMT for symmetry to NIP6_FMT Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/ah6.c3
-rw-r--r--net/ipv6/anycast.c4
-rw-r--r--net/ipv6/esp6.c3
-rw-r--r--net/ipv6/icmp.c2
-rw-r--r--net/ipv6/ip6_flowlabel.c8
-rw-r--r--net/ipv6/ipcomp6.c3
-rw-r--r--net/ipv6/mcast.c9
-rw-r--r--net/ipv6/ndisc.c2
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c5
-rw-r--r--net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c2
-rw-r--r--net/ipv6/xfrm6_tunnel.c8
12 files changed, 19 insertions, 32 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 7129d4239755..dfb4f145a139 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2644,7 +2644,7 @@ static int if6_seq_show(struct seq_file *seq, void *v)
2644{ 2644{
2645 struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v; 2645 struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
2646 seq_printf(seq, 2646 seq_printf(seq,
2647 "%04x%04x%04x%04x%04x%04x%04x%04x %02x %02x %02x %02x %8s\n", 2647 NIP6_FMT " %02x %02x %02x %02x %8s\n",
2648 NIP6(ifp->addr), 2648 NIP6(ifp->addr),
2649 ifp->idev->dev->ifindex, 2649 ifp->idev->dev->ifindex,
2650 ifp->prefix_len, 2650 ifp->prefix_len,
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 13cc7f895583..c7932cb420a5 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -332,8 +332,7 @@ static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
332 if (!x) 332 if (!x)
333 return; 333 return;
334 334
335 NETDEBUG(KERN_DEBUG "pmtu discovery on SA AH/%08x/" 335 NETDEBUG(KERN_DEBUG "pmtu discovery on SA AH/%08x/" NIP6_FMT "\n",
336 "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
337 ntohl(ah->spi), NIP6(iph->daddr)); 336 ntohl(ah->spi), NIP6(iph->daddr));
338 337
339 xfrm_state_put(x); 338 xfrm_state_put(x);
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 65e73ac0d6d0..72bd08af2dfb 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -532,9 +532,7 @@ static int ac6_seq_show(struct seq_file *seq, void *v)
532 struct ac6_iter_state *state = ac6_seq_private(seq); 532 struct ac6_iter_state *state = ac6_seq_private(seq);
533 533
534 seq_printf(seq, 534 seq_printf(seq,
535 "%-4d %-15s " 535 "%-4d %-15s " NIP6_FMT " %5d\n",
536 "%04x%04x%04x%04x%04x%04x%04x%04x "
537 "%5d\n",
538 state->dev->ifindex, state->dev->name, 536 state->dev->ifindex, state->dev->name,
539 NIP6(im->aca_addr), 537 NIP6(im->aca_addr),
540 im->aca_users); 538 im->aca_users);
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 6de8ee1a5ad9..7b5b94f13902 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -266,8 +266,7 @@ static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
266 x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6); 266 x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6);
267 if (!x) 267 if (!x)
268 return; 268 return;
269 printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/" 269 printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/" NIP6_FMT "\n",
270 "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
271 ntohl(esph->spi), NIP6(iph->daddr)); 270 ntohl(esph->spi), NIP6(iph->daddr));
272 xfrm_state_put(x); 271 xfrm_state_put(x);
273} 272}
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 53c81fcd20ba..fcf883183cef 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -607,7 +607,7 @@ static int icmpv6_rcv(struct sk_buff **pskb)
607 skb->csum = ~csum_ipv6_magic(saddr, daddr, skb->len, 607 skb->csum = ~csum_ipv6_magic(saddr, daddr, skb->len,
608 IPPROTO_ICMPV6, 0); 608 IPPROTO_ICMPV6, 0);
609 if (__skb_checksum_complete(skb)) { 609 if (__skb_checksum_complete(skb)) {
610 LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n", 610 LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n",
611 NIP6(*saddr), NIP6(*daddr)); 611 NIP6(*saddr), NIP6(*daddr));
612 goto discard_it; 612 goto discard_it;
613 } 613 }
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index 964ad9d1276d..4183c8dac7f6 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -629,9 +629,7 @@ static void ip6fl_fl_seq_show(struct seq_file *seq, struct ip6_flowlabel *fl)
629{ 629{
630 while(fl) { 630 while(fl) {
631 seq_printf(seq, 631 seq_printf(seq,
632 "%05X %-1d %-6d %-6d %-6ld %-8ld " 632 "%05X %-1d %-6d %-6d %-6ld %-8ld " NIP6_FMT " %-4d\n",
633 "%02x%02x%02x%02x%02x%02x%02x%02x "
634 "%-4d\n",
635 (unsigned)ntohl(fl->label), 633 (unsigned)ntohl(fl->label),
636 fl->share, 634 fl->share,
637 (unsigned)fl->owner, 635 (unsigned)fl->owner,
@@ -647,8 +645,8 @@ static void ip6fl_fl_seq_show(struct seq_file *seq, struct ip6_flowlabel *fl)
647static int ip6fl_seq_show(struct seq_file *seq, void *v) 645static int ip6fl_seq_show(struct seq_file *seq, void *v)
648{ 646{
649 if (v == SEQ_START_TOKEN) 647 if (v == SEQ_START_TOKEN)
650 seq_puts(seq, "Label S Owner Users Linger Expires " 648 seq_printf(seq, "%-5s %-1s %-6s %-6s %-6s %-8s %-39s %s\n",
651 "Dst Opt\n"); 649 "Label", "S", "Owner", "Users", "Linger", "Expires", "Dst", "Opt");
652 else 650 else
653 ip6fl_fl_seq_show(seq, v); 651 ip6fl_fl_seq_show(seq, v);
654 return 0; 652 return 0;
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 626dd39685f2..d511a884dad0 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -212,8 +212,7 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
212 if (!x) 212 if (!x)
213 return; 213 return;
214 214
215 printk(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/" 215 printk(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/" NIP6_FMT "\n",
216 "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
217 spi, NIP6(iph->daddr)); 216 spi, NIP6(iph->daddr));
218 xfrm_state_put(x); 217 xfrm_state_put(x);
219} 218}
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index cc3e9f560867..0e03eabfb9da 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2373,7 +2373,7 @@ static int igmp6_mc_seq_show(struct seq_file *seq, void *v)
2373 struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq); 2373 struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq);
2374 2374
2375 seq_printf(seq, 2375 seq_printf(seq,
2376 "%-4d %-15s %04x%04x%04x%04x%04x%04x%04x%04x %5d %08X %ld\n", 2376 "%-4d %-15s " NIP6_FMT " %5d %08X %ld\n",
2377 state->dev->ifindex, state->dev->name, 2377 state->dev->ifindex, state->dev->name,
2378 NIP6(im->mca_addr), 2378 NIP6(im->mca_addr),
2379 im->mca_users, im->mca_flags, 2379 im->mca_users, im->mca_flags,
@@ -2542,15 +2542,12 @@ static int igmp6_mcf_seq_show(struct seq_file *seq, void *v)
2542 if (v == SEQ_START_TOKEN) { 2542 if (v == SEQ_START_TOKEN) {
2543 seq_printf(seq, 2543 seq_printf(seq,
2544 "%3s %6s " 2544 "%3s %6s "
2545 "%32s %32s %6s %6s\n", "Idx", 2545 "%39s %39s %6s %6s\n", "Idx",
2546 "Device", "Multicast Address", 2546 "Device", "Multicast Address",
2547 "Source Address", "INC", "EXC"); 2547 "Source Address", "INC", "EXC");
2548 } else { 2548 } else {
2549 seq_printf(seq, 2549 seq_printf(seq,
2550 "%3d %6.6s " 2550 "%3d %6.6s " NIP6_FMT " " NIP6_FMT " %6lu %6lu\n",
2551 "%04x%04x%04x%04x%04x%04x%04x%04x "
2552 "%04x%04x%04x%04x%04x%04x%04x%04x "
2553 "%6lu %6lu\n",
2554 state->dev->ifindex, state->dev->name, 2551 state->dev->ifindex, state->dev->name,
2555 NIP6(state->im->mca_addr), 2552 NIP6(state->im->mca_addr),
2556 NIP6(psf->sf_addr), 2553 NIP6(psf->sf_addr),
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 305d9ee6d7db..cb8856b1d951 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -692,7 +692,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
692 if (!(neigh->nud_state & NUD_VALID)) { 692 if (!(neigh->nud_state & NUD_VALID)) {
693 ND_PRINTK1(KERN_DEBUG 693 ND_PRINTK1(KERN_DEBUG
694 "%s(): trying to ucast probe in NUD_INVALID: " 694 "%s(): trying to ucast probe in NUD_INVALID: "
695 "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 695 NIP6_FMT "\n",
696 __FUNCTION__, 696 __FUNCTION__,
697 NIP6(*target)); 697 NIP6(*target));
698 } 698 }
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index fc19d8a4ca68..77c725832dec 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -63,9 +63,8 @@ static void dump_packet(const struct nf_loginfo *info,
63 return; 63 return;
64 } 64 }
65 65
66 /* Max length: 88 "SRC=0000.0000.0000.0000.0000.0000.0000.0000 DST=0000.0000.0000.0000.0000.0000.0000.0000" */ 66 /* Max length: 88 "SRC=0000.0000.0000.0000.0000.0000.0000.0000 DST=0000.0000.0000.0000.0000.0000.0000.0000 " */
67 printk("SRC=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(ih->saddr)); 67 printk("SRC=" NIP6_FMT " DST=" NIP6_FMT " ", NIP6(ih->saddr), NIP6(ih->daddr));
68 printk("DST=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(ih->daddr));
69 68
70 /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */ 69 /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */
71 printk("LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ", 70 printk("LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ",
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
index 92ad53d8f8c3..ac702a29dd16 100644
--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
@@ -74,7 +74,7 @@ static int ipv6_invert_tuple(struct nf_conntrack_tuple *tuple,
74static int ipv6_print_tuple(struct seq_file *s, 74static int ipv6_print_tuple(struct seq_file *s,
75 const struct nf_conntrack_tuple *tuple) 75 const struct nf_conntrack_tuple *tuple)
76{ 76{
77 return seq_printf(s, "src=%x:%x:%x:%x:%x:%x:%x:%x dst=%x:%x:%x:%x:%x:%x:%x:%x ", 77 return seq_printf(s, "src=" NIP6_FMT " dst=" NIP6_FMT " ",
78 NIP6(*((struct in6_addr *)tuple->src.u3.ip6)), 78 NIP6(*((struct in6_addr *)tuple->src.u3.ip6)),
79 NIP6(*((struct in6_addr *)tuple->dst.u3.ip6))); 79 NIP6(*((struct in6_addr *)tuple->dst.u3.ip6)));
80} 80}
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index da09ff258648..8cfc58b96fc2 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -259,8 +259,7 @@ try_next_2:;
259 spi = 0; 259 spi = 0;
260 goto out; 260 goto out;
261alloc_spi: 261alloc_spi:
262 X6TPRINTK3(KERN_DEBUG "%s(): allocate new spi for " 262 X6TPRINTK3(KERN_DEBUG "%s(): allocate new spi for " NIP6_FMT "\n",
263 "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
264 __FUNCTION__, 263 __FUNCTION__,
265 NIP6(*(struct in6_addr *)saddr)); 264 NIP6(*(struct in6_addr *)saddr));
266 x6spi = kmem_cache_alloc(xfrm6_tunnel_spi_kmem, SLAB_ATOMIC); 265 x6spi = kmem_cache_alloc(xfrm6_tunnel_spi_kmem, SLAB_ATOMIC);
@@ -323,9 +322,8 @@ void xfrm6_tunnel_free_spi(xfrm_address_t *saddr)
323 list_byaddr) 322 list_byaddr)
324 { 323 {
325 if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) { 324 if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) {
326 X6TPRINTK3(KERN_DEBUG "%s(): x6spi object " 325 X6TPRINTK3(KERN_DEBUG "%s(): x6spi object for " NIP6_FMT
327 "for %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x " 326 " found at %p\n",
328 "found at %p\n",
329 __FUNCTION__, 327 __FUNCTION__,
330 NIP6(*(struct in6_addr *)saddr), 328 NIP6(*(struct in6_addr *)saddr),
331 x6spi); 329 x6spi);