aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-31 03:54:56 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-31 03:54:56 -0400
commit21454aaad30651ba0dcc16fe5271bc12ee21f132 (patch)
treeeb525494d6f80a0e855840bc588ae1f422348b04 /net/sctp
parent14d5e834f6b36667c7da56374645f99b6cf30814 (diff)
net: replace NIPQUAD() in net/*/
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/sctp')
-rw-r--r--net/sctp/protocol.c18
-rw-r--r--net/sctp/sm_statefuns.c5
2 files changed, 10 insertions, 13 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 0b65354aaf64..a8ca743241ee 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -482,9 +482,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
482 if (saddr) 482 if (saddr)
483 fl.fl4_src = saddr->v4.sin_addr.s_addr; 483 fl.fl4_src = saddr->v4.sin_addr.s_addr;
484 484
485 SCTP_DEBUG_PRINTK("%s: DST:%u.%u.%u.%u, SRC:%u.%u.%u.%u - ", 485 SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ",
486 __func__, NIPQUAD(fl.fl4_dst), 486 __func__, &fl.fl4_dst, &fl.fl4_src);
487 NIPQUAD(fl.fl4_src));
488 487
489 if (!ip_route_output_key(&init_net, &rt, &fl)) { 488 if (!ip_route_output_key(&init_net, &rt, &fl)) {
490 dst = &rt->u.dst; 489 dst = &rt->u.dst;
@@ -540,8 +539,8 @@ out_unlock:
540 rcu_read_unlock(); 539 rcu_read_unlock();
541out: 540out:
542 if (dst) 541 if (dst)
543 SCTP_DEBUG_PRINTK("rt_dst:%u.%u.%u.%u, rt_src:%u.%u.%u.%u\n", 542 SCTP_DEBUG_PRINTK("rt_dst:%pI4, rt_src:%pI4\n",
544 NIPQUAD(rt->rt_dst), NIPQUAD(rt->rt_src)); 543 &rt->rt_dst, &rt->rt_src);
545 else 544 else
546 SCTP_DEBUG_PRINTK("NO ROUTE\n"); 545 SCTP_DEBUG_PRINTK("NO ROUTE\n");
547 546
@@ -646,7 +645,7 @@ static void sctp_v4_addr_v4map(struct sctp_sock *sp, union sctp_addr *addr)
646/* Dump the v4 addr to the seq file. */ 645/* Dump the v4 addr to the seq file. */
647static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) 646static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
648{ 647{
649 seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); 648 seq_printf(seq, "%pI4 ", &addr->v4.sin_addr);
650} 649}
651 650
652static void sctp_v4_ecn_capable(struct sock *sk) 651static void sctp_v4_ecn_capable(struct sock *sk)
@@ -866,11 +865,10 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
866{ 865{
867 struct inet_sock *inet = inet_sk(skb->sk); 866 struct inet_sock *inet = inet_sk(skb->sk);
868 867
869 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, " 868 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI4, dst:%pI4\n",
870 "src:%u.%u.%u.%u, dst:%u.%u.%u.%u\n",
871 __func__, skb, skb->len, 869 __func__, skb, skb->len,
872 NIPQUAD(skb->rtable->rt_src), 870 &skb->rtable->rt_src,
873 NIPQUAD(skb->rtable->rt_dst)); 871 &skb->rtable->rt_dst);
874 872
875 inet->pmtudisc = transport->param_flags & SPP_PMTUD_ENABLE ? 873 inet->pmtudisc = transport->param_flags & SPP_PMTUD_ENABLE ?
876 IP_PMTUDISC_DO : IP_PMTUDISC_DONT; 874 IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index d07b484b873a..9f2a3eb656e5 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1130,11 +1130,10 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1130 } else { 1130 } else {
1131 if (net_ratelimit()) 1131 if (net_ratelimit())
1132 printk(KERN_WARNING 1132 printk(KERN_WARNING
1133 "%s association %p could not find address " 1133 "%s association %p could not find address %pI4\n",
1134 NIPQUAD_FMT "\n",
1135 __func__, 1134 __func__,
1136 asoc, 1135 asoc,
1137 NIPQUAD(from_addr.v4.sin_addr.s_addr)); 1136 &from_addr.v4.sin_addr.s_addr);
1138 } 1137 }
1139 return SCTP_DISPOSITION_DISCARD; 1138 return SCTP_DISPOSITION_DISCARD;
1140 } 1139 }