aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-04-14 07:09:00 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 07:09:00 -0400
commita7d632b6b4ad1c92746ed409e41f9dc571ec04e2 (patch)
tree90e6aa51a9df50aa4a437749e89356ab15a0ff5f /net/ipv4/route.c
parent334f8b2afd9652e20f67ddee4fec483ed860425b (diff)
[IPV4]: Use NIPQUAD_FMT to format ipv4 addresses.
And use %u to format port. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 139799f8a8a1..780e9484c825 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1059,10 +1059,10 @@ restart:
1059#if RT_CACHE_DEBUG >= 2 1059#if RT_CACHE_DEBUG >= 2
1060 if (rt->u.dst.rt_next) { 1060 if (rt->u.dst.rt_next) {
1061 struct rtable *trt; 1061 struct rtable *trt;
1062 printk(KERN_DEBUG "rt_cache @%02x: %u.%u.%u.%u", hash, 1062 printk(KERN_DEBUG "rt_cache @%02x: " NIPQUAD_FMT, hash,
1063 NIPQUAD(rt->rt_dst)); 1063 NIPQUAD(rt->rt_dst));
1064 for (trt = rt->u.dst.rt_next; trt; trt = trt->u.dst.rt_next) 1064 for (trt = rt->u.dst.rt_next; trt; trt = trt->u.dst.rt_next)
1065 printk(" . %u.%u.%u.%u", NIPQUAD(trt->rt_dst)); 1065 printk(" . " NIPQUAD_FMT, NIPQUAD(trt->rt_dst));
1066 printk("\n"); 1066 printk("\n");
1067 } 1067 }
1068#endif 1068#endif
@@ -1275,9 +1275,9 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
1275reject_redirect: 1275reject_redirect:
1276#ifdef CONFIG_IP_ROUTE_VERBOSE 1276#ifdef CONFIG_IP_ROUTE_VERBOSE
1277 if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit()) 1277 if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit())
1278 printk(KERN_INFO "Redirect from %u.%u.%u.%u on %s about " 1278 printk(KERN_INFO "Redirect from " NIPQUAD_FMT " on %s about "
1279 "%u.%u.%u.%u ignored.\n" 1279 NIPQUAD_FMT " ignored.\n"
1280 " Advised path = %u.%u.%u.%u -> %u.%u.%u.%u\n", 1280 " Advised path = " NIPQUAD_FMT " -> " NIPQUAD_FMT "\n",
1281 NIPQUAD(old_gw), dev->name, NIPQUAD(new_gw), 1281 NIPQUAD(old_gw), dev->name, NIPQUAD(new_gw),
1282 NIPQUAD(saddr), NIPQUAD(daddr)); 1282 NIPQUAD(saddr), NIPQUAD(daddr));
1283#endif 1283#endif
@@ -1299,7 +1299,7 @@ static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)
1299 rt->fl.oif); 1299 rt->fl.oif);
1300#if RT_CACHE_DEBUG >= 1 1300#if RT_CACHE_DEBUG >= 1
1301 printk(KERN_DEBUG "ipv4_negative_advice: redirect to " 1301 printk(KERN_DEBUG "ipv4_negative_advice: redirect to "
1302 "%u.%u.%u.%u/%02x dropped\n", 1302 NIPQUAD_FMT "/%02x dropped\n",
1303 NIPQUAD(rt->rt_dst), rt->fl.fl4_tos); 1303 NIPQUAD(rt->rt_dst), rt->fl.fl4_tos);
1304#endif 1304#endif
1305 rt_del(hash, rt); 1305 rt_del(hash, rt);
@@ -1364,8 +1364,8 @@ void ip_rt_send_redirect(struct sk_buff *skb)
1364 if (IN_DEV_LOG_MARTIANS(in_dev) && 1364 if (IN_DEV_LOG_MARTIANS(in_dev) &&
1365 rt->u.dst.rate_tokens == ip_rt_redirect_number && 1365 rt->u.dst.rate_tokens == ip_rt_redirect_number &&
1366 net_ratelimit()) 1366 net_ratelimit())
1367 printk(KERN_WARNING "host %u.%u.%u.%u/if%d ignores " 1367 printk(KERN_WARNING "host " NIPQUAD_FMT "/if%d ignores "
1368 "redirects for %u.%u.%u.%u to %u.%u.%u.%u.\n", 1368 "redirects for " NIPQUAD_FMT " to " NIPQUAD_FMT ".\n",
1369 NIPQUAD(rt->rt_src), rt->rt_iif, 1369 NIPQUAD(rt->rt_src), rt->rt_iif,
1370 NIPQUAD(rt->rt_dst), NIPQUAD(rt->rt_gateway)); 1370 NIPQUAD(rt->rt_dst), NIPQUAD(rt->rt_gateway));
1371#endif 1371#endif
@@ -1552,7 +1552,7 @@ static void ipv4_link_failure(struct sk_buff *skb)
1552 1552
1553static int ip_rt_bug(struct sk_buff *skb) 1553static int ip_rt_bug(struct sk_buff *skb)
1554{ 1554{
1555 printk(KERN_DEBUG "ip_rt_bug: %u.%u.%u.%u -> %u.%u.%u.%u, %s\n", 1555 printk(KERN_DEBUG "ip_rt_bug: " NIPQUAD_FMT " -> " NIPQUAD_FMT ", %s\n",
1556 NIPQUAD(ip_hdr(skb)->saddr), NIPQUAD(ip_hdr(skb)->daddr), 1556 NIPQUAD(ip_hdr(skb)->saddr), NIPQUAD(ip_hdr(skb)->daddr),
1557 skb->dev ? skb->dev->name : "?"); 1557 skb->dev ? skb->dev->name : "?");
1558 kfree_skb(skb); 1558 kfree_skb(skb);
@@ -1730,8 +1730,8 @@ static void ip_handle_martian_source(struct net_device *dev,
1730 * RFC1812 recommendation, if source is martian, 1730 * RFC1812 recommendation, if source is martian,
1731 * the only hint is MAC header. 1731 * the only hint is MAC header.
1732 */ 1732 */
1733 printk(KERN_WARNING "martian source %u.%u.%u.%u from " 1733 printk(KERN_WARNING "martian source " NIPQUAD_FMT " from "
1734 "%u.%u.%u.%u, on dev %s\n", 1734 NIPQUAD_FMT", on dev %s\n",
1735 NIPQUAD(daddr), NIPQUAD(saddr), dev->name); 1735 NIPQUAD(daddr), NIPQUAD(saddr), dev->name);
1736 if (dev->hard_header_len && skb_mac_header_was_set(skb)) { 1736 if (dev->hard_header_len && skb_mac_header_was_set(skb)) {
1737 int i; 1737 int i;
@@ -2040,8 +2040,8 @@ martian_destination:
2040 RT_CACHE_STAT_INC(in_martian_dst); 2040 RT_CACHE_STAT_INC(in_martian_dst);
2041#ifdef CONFIG_IP_ROUTE_VERBOSE 2041#ifdef CONFIG_IP_ROUTE_VERBOSE
2042 if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit()) 2042 if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit())
2043 printk(KERN_WARNING "martian destination %u.%u.%u.%u from " 2043 printk(KERN_WARNING "martian destination " NIPQUAD_FMT " from "
2044 "%u.%u.%u.%u, dev %s\n", 2044 NIPQUAD_FMT ", dev %s\n",
2045 NIPQUAD(daddr), NIPQUAD(saddr), dev->name); 2045 NIPQUAD(daddr), NIPQUAD(saddr), dev->name);
2046#endif 2046#endif
2047 2047