From 4d27514e7398168201c84a112e1d9a3b1395f0c9 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 20 Aug 2019 13:32:31 +0100 Subject: [PATCH] ARP: Respect IFF_NOARP interface flag more --- src/dhcp.c | 5 ++++- src/ipv4.c | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dhcp.c b/src/dhcp.c index 245ad5c4..8e48592f 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2365,7 +2365,10 @@ dhcp_arp_address(struct interface *ifp) return 0; } #else - if (ifp->options->options & DHCPCD_ARP && ia == NULL) { + if (!(ifp->flags & IFF_NOARP) && + ifp->options->options & DHCPCD_ARP && + ia == NULL) + { struct arp_state *astate; struct dhcp_lease l; diff --git a/src/ipv4.c b/src/ipv4.c index c3cb0bfb..f5976618 100644 --- a/src/ipv4.c +++ b/src/ipv4.c @@ -742,7 +742,8 @@ ipv4_applyaddr(void *arg) #ifdef ARP /* Announce the preferred address to * kick ARP caches. */ - arp_announceaddr(ifp->ctx, &lease->addr); + if (!(ifp->flags & IFF_NOARP)) + arp_announceaddr(ifp->ctx,&lease->addr); #endif } script_runreason(ifp, state->reason); @@ -804,7 +805,8 @@ ipv4_applyaddr(void *arg) rt_build(ifp->ctx, AF_INET); #ifdef ARP - arp_announceaddr(ifp->ctx, &state->addr->addr); + if (!(ifp->flags & IFF_NOARP)) + arp_announceaddr(ifp->ctx, &state->addr->addr); #endif if (state->state == DHS_BOUND) { -- 2.47.3