]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
NetBSD: Allow dhcpcd to be built without ARP support
authorRoy Marples <roy@marples.name>
Thu, 25 Jul 2019 15:27:09 +0000 (16:27 +0100)
committerRoy Marples <roy@marples.name>
Thu, 25 Jul 2019 15:27:09 +0000 (16:27 +0100)
Because NetBSD has RFC 5227 support in the kernel, we only need
ARP to announce addresses and we only need to do that when
address sharing which shouldn't be a concern for small
installations where size is paramount.

src/dhcp.c

index 8b75865a6096551311c0882bc109e12442bda7a2..01f73c0ec1c1017d639da0f1982cdb967586849e 100644 (file)
@@ -2329,7 +2329,9 @@ dhcp_arp_new(struct interface *ifp, struct in_addr *addr)
        return astate;
 }
 #endif
+#endif /* ARP */
 
+#if defined(ARP) || defined(KERNEL_RFC5227)
 static int
 dhcp_arp_address(struct interface *ifp)
 {
@@ -2417,7 +2419,7 @@ dhcp_static(struct interface *ifp)
            ia ? &ia->addr : &ifo->req_addr,
            ia ? &ia->mask : &ifo->req_mask);
        if (state->offer_len)
-#ifdef ARP
+#if defined(ARP) || defined(KERNEL_RFC5227)
                dhcp_arp_bind(ifp);
 #else
                dhcp_bind(ifp);
@@ -3210,7 +3212,7 @@ rapidcommit:
        lease->frominfo = 0;
        eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
 
-#ifdef ARP
+#if defined(ARP) || defined(KERNEL_RFC5227)
        dhcp_arp_bind(ifp);
 #else
        dhcp_bind(ifp);