Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328031
b: refs/heads/master
c: 5e95377
h: refs/heads/master
i:
  328029: a02d052
  328027: 8f15008
  328023: b939fd2
  328015: 0a417a0
  327999: 519c6eb
v: v3
  • Loading branch information
Christoph Fritz authored and David S. Miller committed Sep 21, 2012
1 parent 4278e27 commit 8a73c0f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42d94dcb68b939c72fded1b3974cd240723afa0c
refs/heads/master: 5e953778a2aab04929a5e7b69f53dc26e39b079e
10 changes: 9 additions & 1 deletion trunk/Documentation/filesystems/nfs/nfsroot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
flags = hard, nointr, noposix, cto, ac


ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:
<dns0-ip>:<dns1-ip>

This parameter tells the kernel how to configure IP addresses of devices
and also how to set up the IP routing table. It was originally called
Expand Down Expand Up @@ -158,6 +159,13 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

Default: any

<dns0-ip> IP address of first nameserver.
Value gets exported by /proc/net/pnp which is often linked
on embedded systems by /etc/resolv.conf.

<dns1-ip> IP address of secound nameserver.
Same as above.


nfsrootdebug

Expand Down
39 changes: 36 additions & 3 deletions trunk/net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,22 @@ static void __init ic_bootp_init_ext(u8 *e)


/*
* Initialize the DHCP/BOOTP mechanism.
* Predefine Nameservers
*/
static inline void __init ic_bootp_init(void)
static inline void __init ic_nameservers_predef(void)
{
int i;

for (i = 0; i < CONF_NAMESERVERS_MAX; i++)
ic_nameservers[i] = NONE;
}

/*
* Initialize the DHCP/BOOTP mechanism.
*/
static inline void __init ic_bootp_init(void)
{
ic_nameservers_predef();

dev_add_pack(&bootp_packet_type);
}
Expand Down Expand Up @@ -1379,6 +1387,7 @@ static int __init ip_auto_config(void)
int retries = CONF_OPEN_RETRIES;
#endif
int err;
unsigned int i;

#ifdef CONFIG_PROC_FS
proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops);
Expand Down Expand Up @@ -1499,7 +1508,15 @@ static int __init ip_auto_config(void)
&ic_servaddr, &root_server_addr, root_server_path);
if (ic_dev_mtu)
pr_cont(", mtu=%d", ic_dev_mtu);
pr_cont("\n");
for (i = 0; i < CONF_NAMESERVERS_MAX; i++)
if (ic_nameservers[i] != NONE) {
pr_info(" nameserver%u=%pI4",
i, &ic_nameservers[i]);
break;
}
for (i++; i < CONF_NAMESERVERS_MAX; i++)
if (ic_nameservers[i] != NONE)
pr_cont(", nameserver%u=%pI4\n", i, &ic_nameservers[i]);
#endif /* !SILENT */

return 0;
Expand Down Expand Up @@ -1570,6 +1587,8 @@ static int __init ip_auto_config_setup(char *addrs)
return 1;
}

ic_nameservers_predef();

/* Parse string for static IP assignment. */
ip = addrs;
while (ip && *ip) {
Expand Down Expand Up @@ -1613,6 +1632,20 @@ static int __init ip_auto_config_setup(char *addrs)
ic_enable = 0;
}
break;
case 7:
if (CONF_NAMESERVERS_MAX >= 1) {
ic_nameservers[0] = in_aton(ip);
if (ic_nameservers[0] == ANY)
ic_nameservers[0] = NONE;
}
break;
case 8:
if (CONF_NAMESERVERS_MAX >= 2) {
ic_nameservers[1] = in_aton(ip);
if (ic_nameservers[1] == ANY)
ic_nameservers[1] = NONE;
}
break;
}
}
ip = cp;
Expand Down

0 comments on commit 8a73c0f

Please sign in to comment.