summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-10-14 08:55:04 +0000
committerRoy Marples <roy@marples.name>2016-10-14 08:55:04 +0000
commitb60e3c956a47e773af457a95768a63b5866f6ec3 (patch)
treef3557a37439466c37a57c589569423f2ba283dbc /dhcpcd.c
parent448235e23aa607bb54c5b1ca6266d4b85f784722 (diff)
downloaddhcpcd-b60e3c956a47e773af457a95768a63b5866f6ec3.tar.xz
Support kernels which implement RFC5227.
This means we don't have to open an ARP socket unless we need to ARPing. Allow ARP an ARPing to be optional features.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 8b8f1220..33dfe05e 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -370,7 +370,7 @@ dhcpcd_drop(struct interface *ifp, int stop)
ipv6_drop(ifp);
ipv4ll_drop(ifp);
dhcp_drop(ifp, stop ? "STOP" : "EXPIRE");
- arp_close(ifp);
+ arp_drop(ifp);
}
static void
@@ -722,7 +722,7 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags,
ifp->carrier = LINK_DOWN;
script_runreason(ifp, "NOCARRIER");
#ifdef NOCARRIER_PRESERVE_IP
- arp_close(ifp);
+ arp_drop(ifp);
dhcp_abort(ifp);
if_sortinterfaces(ctx);
ipv4_preferanother(ifp);
@@ -1446,6 +1446,12 @@ main(int argc, char **argv)
#ifdef INET
" INET"
#endif
+#ifdef ARP
+ " ARP"
+#endif
+#ifdef ARPING
+ " ARPing"
+#endif
#ifdef IPV4LL
" IPv4LL"
#endif