aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipconfig.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:49:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:49:40 -0500
commit0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch)
tree454d1842b1833d976da62abcbd5c47521ebe9bd7 /net/ipv4/ipconfig.c
parent54a696bd07c14d3b1192d03ce7269bc59b45209a (diff)
parenteb56092fc168bf5af199d47af50c0d84a96db898 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits) net: Allow dependancies of FDDI & Tokenring to be modular. igb: Fix build warning when DCA is disabled. net: Fix warning fallout from recent NAPI interface changes. gro: Fix potential use after free sfc: If AN is enabled, always read speed/duplex from the AN advertising bits sfc: When disabling the NIC, close the device rather than unregistering it sfc: SFT9001: Add cable diagnostics sfc: Add support for multiple PHY self-tests sfc: Merge top-level functions for self-tests sfc: Clean up PHY mode management in loopback self-test sfc: Fix unreliable link detection in some loopback modes sfc: Generate unique names for per-NIC workqueues 802.3ad: use standard ethhdr instead of ad_header 802.3ad: generalize out mac address initializer 802.3ad: initialize ports LACPDU from const initializer 802.3ad: remove typedef around ad_system 802.3ad: turn ports is_individual into a bool 802.3ad: turn ports is_enabled into a bool 802.3ad: make ntt bool ixgbe: Fix set_ringparam in ixgbe to use the same memory pools. ... Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due to the conversion to %pI (in this networking merge) and the addition of doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'net/ipv4/ipconfig.c')
-rw-r--r--net/ipv4/ipconfig.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 42065fff46c4..42a0f3dd3fd6 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -374,7 +374,7 @@ static int __init ic_defaults(void)
374 */ 374 */
375 375
376 if (!ic_host_name_set) 376 if (!ic_host_name_set)
377 sprintf(init_utsname()->nodename, NIPQUAD_FMT, NIPQUAD(ic_myaddr)); 377 sprintf(init_utsname()->nodename, "%pI4", &ic_myaddr);
378 378
379 if (root_server_addr == NONE) 379 if (root_server_addr == NONE)
380 root_server_addr = ic_servaddr; 380 root_server_addr = ic_servaddr;
@@ -387,11 +387,11 @@ static int __init ic_defaults(void)
387 else if (IN_CLASSC(ntohl(ic_myaddr))) 387 else if (IN_CLASSC(ntohl(ic_myaddr)))
388 ic_netmask = htonl(IN_CLASSC_NET); 388 ic_netmask = htonl(IN_CLASSC_NET);
389 else { 389 else {
390 printk(KERN_ERR "IP-Config: Unable to guess netmask for address " NIPQUAD_FMT "\n", 390 printk(KERN_ERR "IP-Config: Unable to guess netmask for address %pI4\n",
391 NIPQUAD(ic_myaddr)); 391 &ic_myaddr);
392 return -1; 392 return -1;
393 } 393 }
394 printk("IP-Config: Guessing netmask " NIPQUAD_FMT "\n", NIPQUAD(ic_netmask)); 394 printk("IP-Config: Guessing netmask %pI4\n", &ic_netmask);
395 } 395 }
396 396
397 return 0; 397 return 0;
@@ -979,10 +979,8 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
979 ic_myaddr = b->your_ip; 979 ic_myaddr = b->your_ip;
980 ic_servaddr = server_id; 980 ic_servaddr = server_id;
981#ifdef IPCONFIG_DEBUG 981#ifdef IPCONFIG_DEBUG
982 printk("DHCP: Offered address " NIPQUAD_FMT, 982 printk("DHCP: Offered address %pI4 by server %pI4\n",
983 NIPQUAD(ic_myaddr)); 983 &ic_myaddr, &ic_servaddr);
984 printk(" by server " NIPQUAD_FMT "\n",
985 NIPQUAD(ic_servaddr));
986#endif 984#endif
987 /* The DHCP indicated server address takes 985 /* The DHCP indicated server address takes
988 * precedence over the bootp header one if 986 * precedence over the bootp header one if
@@ -1177,11 +1175,11 @@ static int __init ic_dynamic(void)
1177 return -1; 1175 return -1;
1178 } 1176 }
1179 1177
1180 printk("IP-Config: Got %s answer from " NIPQUAD_FMT ", ", 1178 printk("IP-Config: Got %s answer from %pI4, ",
1181 ((ic_got_reply & IC_RARP) ? "RARP" 1179 ((ic_got_reply & IC_RARP) ? "RARP"
1182 : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"), 1180 : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"),
1183 NIPQUAD(ic_servaddr)); 1181 &ic_servaddr);
1184 printk("my address is " NIPQUAD_FMT "\n", NIPQUAD(ic_myaddr)); 1182 printk("my address is %pI4\n", &ic_myaddr);
1185 1183
1186 return 0; 1184 return 0;
1187} 1185}
@@ -1206,14 +1204,12 @@ static int pnp_seq_show(struct seq_file *seq, void *v)
1206 "domain %s\n", ic_domain); 1204 "domain %s\n", ic_domain);
1207 for (i = 0; i < CONF_NAMESERVERS_MAX; i++) { 1205 for (i = 0; i < CONF_NAMESERVERS_MAX; i++) {
1208 if (ic_nameservers[i] != NONE) 1206 if (ic_nameservers[i] != NONE)
1209 seq_printf(seq, 1207 seq_printf(seq, "nameserver %pI4\n",
1210 "nameserver " NIPQUAD_FMT "\n", 1208 &ic_nameservers[i]);
1211 NIPQUAD(ic_nameservers[i]));
1212 } 1209 }
1213 if (ic_servaddr != NONE) 1210 if (ic_servaddr != NONE)
1214 seq_printf(seq, 1211 seq_printf(seq, "bootserver %pI4\n",
1215 "bootserver " NIPQUAD_FMT "\n", 1212 &ic_servaddr);
1216 NIPQUAD(ic_servaddr));
1217 return 0; 1213 return 0;
1218} 1214}
1219 1215
@@ -1387,13 +1383,13 @@ static int __init ip_auto_config(void)
1387 */ 1383 */
1388 printk("IP-Config: Complete:"); 1384 printk("IP-Config: Complete:");
1389 printk("\n device=%s", ic_dev->name); 1385 printk("\n device=%s", ic_dev->name);
1390 printk(", addr=" NIPQUAD_FMT, NIPQUAD(ic_myaddr)); 1386 printk(", addr=%pI4", &ic_myaddr);
1391 printk(", mask=" NIPQUAD_FMT, NIPQUAD(ic_netmask)); 1387 printk(", mask=%pI4", &ic_netmask);
1392 printk(", gw=" NIPQUAD_FMT, NIPQUAD(ic_gateway)); 1388 printk(", gw=%pI4", &ic_gateway);
1393 printk(",\n host=%s, domain=%s, nis-domain=%s", 1389 printk(",\n host=%s, domain=%s, nis-domain=%s",
1394 utsname()->nodename, ic_domain, utsname()->domainname); 1390 utsname()->nodename, ic_domain, utsname()->domainname);
1395 printk(",\n bootserver=" NIPQUAD_FMT, NIPQUAD(ic_servaddr)); 1391 printk(",\n bootserver=%pI4", &ic_servaddr);
1396 printk(", rootserver=" NIPQUAD_FMT, NIPQUAD(root_server_addr)); 1392 printk(", rootserver=%pI4", &root_server_addr);
1397 printk(", rootpath=%s", root_server_path); 1393 printk(", rootpath=%s", root_server_path);
1398 printk("\n"); 1394 printk("\n");
1399#endif /* !SILENT */ 1395#endif /* !SILENT */