summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2016-06-28 17:18:25 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2016-06-28 17:18:25 +0000
commit941b982c6a5fb8cf8e10abb6d6a40032002bc749 (patch)
tree047c89f280cf9da0fa9aae8927fc255fcc414c91 /sys
parent1b6ada3a4334b5bda93c202f584f56f92849d372 (diff)
Add sysctl for arp timers: net.inet.ip.arptimeout (expire timer for resolved
entries) and net.inet.ip.arpdown (expire timer for unresolved entries) ok mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/if_ether.c6
-rw-r--r--sys/netinet/if_ether.h5
-rw-r--r--sys/netinet/in.h10
3 files changed, 15 insertions, 6 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 284571bb467..31ef3eff061 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.215 2016/06/14 09:44:41 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.216 2016/06/28 17:18:24 chris Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -74,8 +74,8 @@ struct llinfo_arp {
#define LA_HOLD_TOTAL 100
/* timer values */
-int arpt_prune = (5*60*1); /* walk list every 5 minutes */
-int arpt_keep = (20*60); /* once resolved, good for 20 more minutes */
+int arpt_prune = (5 * 60); /* walk list every 5 minutes */
+int arpt_keep = (20 * 60); /* once resolved, cache for 20 minutes */
int arpt_down = 20; /* once declared down, don't send for 20 secs */
void arptfree(struct rtentry *);
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h
index 56e52bd79fa..279632102f8 100644
--- a/sys/netinet/if_ether.h
+++ b/sys/netinet/if_ether.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.h,v 1.71 2016/05/18 20:15:14 mpi Exp $ */
+/* $OpenBSD: if_ether.h,v 1.72 2016/06/28 17:18:24 chris Exp $ */
/* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */
/*
@@ -202,6 +202,9 @@ struct arpcom {
};
+extern int arpt_keep; /* arp resolved cache expire */
+extern int arpt_down; /* arp down cache expire */
+
extern u_int8_t etherbroadcastaddr[ETHER_ADDR_LEN];
extern u_int8_t etheranyaddr[ETHER_ADDR_LEN];
extern u_int8_t ether_ipmulticast_min[ETHER_ADDR_LEN];
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 7859ca27614..31b2a26b453 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.116 2016/06/15 19:39:34 gerhard Exp $ */
+/* $OpenBSD: in.h,v 1.117 2016/06/28 17:18:24 chris Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -682,7 +682,9 @@ struct ip_mreq {
#define IPCTL_ARPQUEUED 36
#define IPCTL_MRTMFC 37
#define IPCTL_MRTVIF 38
-#define IPCTL_MAXID 39
+#define IPCTL_ARPTIMEOUT 39
+#define IPCTL_ARPDOWN 40
+#define IPCTL_MAXID 41
#define IPCTL_NAMES { \
{ 0, 0 }, \
@@ -724,6 +726,8 @@ struct ip_mreq {
{ "arpqueued", CTLTYPE_INT }, \
{ "mrtmfc", CTLTYPE_STRUCT }, \
{ "mrtvif", CTLTYPE_STRUCT }, \
+ { "arptimeout", CTLTYPE_INT }, \
+ { "arpdown", CTLTYPE_INT }, \
}
#define IPCTL_VARS { \
NULL, \
@@ -765,6 +769,8 @@ struct ip_mreq {
&la_hold_total, \
NULL, \
NULL, \
+ &arpt_keep, \
+ &arpt_down, \
}
#endif /* __BSD_VISIBLE */