summaryrefslogtreecommitdiffstats
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-10-01 08:32:37 +0000
committerru <ru@FreeBSD.org>2003-10-01 08:32:37 +0000
commite7ebf2c29a49deea4eaab17c9af60539b957ba24 (patch)
tree655d5100ad39fe3012e7422a221468ace2d6d417 /sys/netinet/if_ether.c
parent52f3ed471697534d35a97f910949a43788f33d8e (diff)
downloadFreeBSD-src-e7ebf2c29a49deea4eaab17c9af60539b957ba24.zip
FreeBSD-src-e7ebf2c29a49deea4eaab17c9af60539b957ba24.tar.gz
By popular demand, added the "static ARP" per-interface option.
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c6
1 files changed, 4 insertions, 2 deletions
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