genode/repos/dde_linux/patches/lxip_ip_config.patch

78 lines
2.8 KiB
Diff
Raw Normal View History

ip_config.patch
2014-11-22 15:09:18 +01:00
From: Sebastian Sumpf <sebastian.sumpf@genode-labs.com>
2014-11-22 15:09:18 +01:00
---
net/ipv4/ipconfig.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 0bc7412..c907f8d 100644
2014-11-22 15:09:18 +01:00
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -133,7 +133,7 @@ int ic_proto_enabled __initdata = 0
static int ic_host_name_set __initdata; /* Host name set by us? */
__be32 ic_myaddr = NONE; /* My IP address */
-static __be32 ic_netmask = NONE; /* Netmask for local subnet */
+__be32 ic_netmask = NONE; /* Netmask for local subnet */
__be32 ic_gateway = NONE; /* Gateway IP address */
__be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
@@ -153,7 +153,7 @@ static char dhcp_client_identifier[253] __initdata;
/* Persistent data: */
static int ic_proto_used; /* Protocol used, if any */
-static __be32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */
+__be32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */
static u8 ic_domain[64]; /* DNS (not NIS) domain name */
/*
@@ -1531,24 +1531,24 @@ static int __init ip_auto_config(void)
2013-08-26 13:58:58 +02:00
*/
pr_info("IP-Config: Complete:\n");
- pr_info(" device=%s, hwaddr=%*phC, ipaddr=%pI4, mask=%pI4, gw=%pI4\n",
- ic_dev->name, ic_dev->addr_len, ic_dev->dev_addr,
- &ic_myaddr, &ic_netmask, &ic_gateway);
+ pr_info(" device=%s, len=%u hwaddr=" MAC_FMT ", ipaddr=" IP_FMT ", mask=" IP_FMT " , gw=" IP_FMT "\n",
+ ic_dev->name, ic_dev->addr_len, MAC_ARG(ic_dev->dev_addr),
+ IP_ARG(ic_myaddr), IP_ARG(ic_netmask), IP_ARG(ic_gateway));
pr_info(" host=%s, domain=%s, nis-domain=%s\n",
utsname()->nodename, ic_domain, utsname()->domainname);
- pr_info(" bootserver=%pI4, rootserver=%pI4, rootpath=%s",
- &ic_servaddr, &root_server_addr, root_server_path);
+ pr_info(" bootserver=" IP_FMT ", rootserver=" IP_FMT ", rootpath=%s\n",
+ IP_ARG(ic_servaddr), IP_ARG(root_server_addr), root_server_path);
if (ic_dev_mtu)
pr_cont(", mtu=%d", ic_dev_mtu);
for (i = 0; i < CONF_NAMESERVERS_MAX; i++)
if (ic_nameservers[i] != NONE) {
- pr_info(" nameserver%u=%pI4",
- i, &ic_nameservers[i]);
+ pr_info(" nameserver%u=" IP_FMT,
+ i, IP_ARG(ic_nameservers[i]));
break;
}
for (i++; i < CONF_NAMESERVERS_MAX; i++)
if (ic_nameservers[i] != NONE)
- pr_cont(", nameserver%u=%pI4", i, &ic_nameservers[i]);
+ pr_cont(", nameserver%u=" IP_FMT, i, IP_ARG(ic_nameservers[i]));
pr_cont("\n");
#endif /* !SILENT */
@@ -1621,6 +1621,12 @@ static int __init ip_auto_config_setup(char *addrs)
ic_set_manually = 1;
ic_enable = 1;
+ ic_myaddr = NONE;
+ ic_netmask = NONE;
+ ic_gateway = NONE;
+ ic_servaddr = NONE;
+ ic_got_reply = 0;
+
/*
* If any dhcp, bootp etc options are set, leave autoconfig on
* and skip the below static IP processing.