summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.h1
-rw-r--r--sys/netinet/if_ether.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index 7c6349d..44531d2 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -150,6 +150,7 @@ struct if_data {
#define IFF_POLLING 0x10000 /* Interface is in polling mode. */
#define IFF_PPROMISC 0x20000 /* user-requested promisc mode */
#define IFF_MONITOR 0x40000 /* user-requested monitor mode */
+#define IFF_STATICARP 0x80000 /* static ARP */
/* flags set internally only: */
#define IFF_CANTCHANGE \
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index a5b89e7..05b47e8 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -454,12 +454,12 @@ arpresolve(ifp, rt, m, dst, desten, rt0)
return 1;
}
/*
- * If ARP is disabled on this interface, stop.
+ * If ARP is disabled or static on this interface, stop.
* XXX
* Probably should not allocate empty llinfo struct if we are
* not going to be sending out an arp request.
*/
- if (ifp->if_flags & IFF_NOARP) {
+ if (ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) {
m_freem(m);
return (0);
}
@@ -650,6 +650,8 @@ match:
itaddr = myaddr;
goto reply;
}
+ if (ifp->if_flags & IFF_STATICARP)
+ goto reply;
la = arplookup(isaddr.s_addr, itaddr.s_addr == myaddr.s_addr, 0);
if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
/* the following is not an error when doing bridging */
OpenPOWER on IntegriCloud