Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348400
b: refs/heads/master
c: 9dd4a13
h: refs/heads/master
v: v3
  • Loading branch information
Philippe De Muyter authored and David S. Miller committed Jan 4, 2013
1 parent ec99129 commit ec74eb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 3b09adcb20c1e393a8721b1805f49dd8c1657563
refs/heads/master: 9dd4a13a89d7c27e51cb87b9e95e82d8999826da
8 changes: 6 additions & 2 deletions trunk/net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ __be32 ic_myaddr = NONE; /* My IP address */
static __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 */

__be32 ic_servaddr = NONE; /* Boot server IP address */

__be32 root_server_addr = NONE; /* Address of NFS server */
Expand Down Expand Up @@ -558,6 +560,7 @@ ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
if (ic_myaddr == NONE)
ic_myaddr = tip;
ic_servaddr = sip;
ic_addrservaddr = sip;
ic_got_reply = IC_RARP;

drop_unlock:
Expand Down Expand Up @@ -1068,7 +1071,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
ic_servaddr = server_id;
#ifdef IPCONFIG_DEBUG
printk("DHCP: Offered address %pI4 by server %pI4\n",
&ic_myaddr, &ic_servaddr);
&ic_myaddr, &b->iph.saddr);
#endif
/* The DHCP indicated server address takes
* precedence over the bootp header one if
Expand Down Expand Up @@ -1113,6 +1116,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
ic_dev = dev;
ic_myaddr = b->your_ip;
ic_servaddr = b->server_ip;
ic_addrservaddr = b->iph.saddr;
if (ic_gateway == NONE && b->relay_ip)
ic_gateway = b->relay_ip;
if (ic_nameservers[0] == NONE)
Expand Down Expand Up @@ -1268,7 +1272,7 @@ static int __init ic_dynamic(void)
printk("IP-Config: Got %s answer from %pI4, ",
((ic_got_reply & IC_RARP) ? "RARP"
: (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"),
&ic_servaddr);
&ic_addrservaddr);
pr_cont("my address is %pI4\n", &ic_myaddr);

return 0;
Expand Down

0 comments on commit ec74eb6

Please sign in to comment.