[IPV4]: ipconfig.c: fix dhcp timeout behaviour

I think there is a small bug in ipconfig.c in case IPCONFIG_DHCP is set
and dhcp is used.

When a DHCPOFFER is received, ip address is kept until we get DHCPACK.
If no ack is received, ic_dynamic() returns negatively, but leaves the
offered ip address in ic_myaddr.

This makes the main loop in ip_auto_config() break and uses the maybe
incomplete configuration.

Not sure if it's the best way to do, but the following trivial patch
correct this.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Maxime Bizon and committed by David S. Miller 7a1af5d7 2c2910a4

+3 -1
+3 -1
net/ipv4/ipconfig.c
··· 1149 ic_rarp_cleanup(); 1150 #endif 1151 1152 - if (!ic_got_reply) 1153 return -1; 1154 1155 printk("IP-Config: Got %s answer from %u.%u.%u.%u, ", 1156 ((ic_got_reply & IC_RARP) ? "RARP"
··· 1149 ic_rarp_cleanup(); 1150 #endif 1151 1152 + if (!ic_got_reply) { 1153 + ic_myaddr = INADDR_NONE; 1154 return -1; 1155 + } 1156 1157 printk("IP-Config: Got %s answer from %u.%u.%u.%u, ", 1158 ((ic_got_reply & IC_RARP) ? "RARP"