]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IP4: No need to set a variable to arp announce the address
authorRoy Marples <roy@marples.name>
Wed, 6 Feb 2019 19:38:01 +0000 (19:38 +0000)
committerRoy Marples <roy@marples.name>
Wed, 6 Feb 2019 19:38:01 +0000 (19:38 +0000)
src/ipv4.c

index 44f8a15d45163f8748a0f07055d5cdc59671be62..57f70a77b53f1aec49d3338e1ddcb65ec83046be 100644 (file)
@@ -706,15 +706,12 @@ ipv4_applyaddr(void *arg)
                    (DHCPCD_EXITING | DHCPCD_PERSISTENT))
                {
                        if (state->added) {
-                               struct in_addr addr;
-
-                               addr = lease->addr;
                                delete_address(ifp);
                                rt_build(ifp->ctx, AF_INET);
 #ifdef ARP
                                /* Announce the preferred address to
                                 * kick ARP caches. */
-                               arp_announceaddr(ifp->ctx, &addr);
+                               arp_announceaddr(ifp->ctx, &lease->addr);
 #endif
                        }
                        script_runreason(ifp, state->reason);