]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix gratuitous ARP with fork()less systems.
authorRoy Marples <roy@marples.name>
Sat, 12 Jul 2008 00:49:59 +0000 (00:49 +0000)
committerRoy Marples <roy@marples.name>
Sat, 12 Jul 2008 00:49:59 +0000 (00:49 +0000)
client.c

index b67cc8a88e3a7fd2e98b526ae40259a999dfc41a..b901f452c146a42cf7fd9b6d92fffad2ac3ed1da 100644 (file)
--- a/client.c
+++ b/client.c
@@ -504,9 +504,12 @@ client_setup(struct if_state *state, const struct options *options)
                if (options->options & DHCPCD_DAEMONISED) {
                        iface->addr.s_addr = lease->addr.s_addr;
                        iface->net.s_addr = lease->net.s_addr;
+                       state->new = state->offer;
+                       state->offer = NULL;
                        get_option_addr(&lease->server.s_addr,
-                                       state->offer, DHCP_SERVERID);
+                                       state->new, DHCP_SERVERID);
 #ifdef ENABLE_ARP
+                       open_socket(iface, ETHERTYPE_ARP);
                        state->state = STATE_ANNOUNCING;
                        tv.tv_sec = ANNOUNCE_INTERVAL;
 #else