Hi, The variable la_hold_total contains the number of packets currently in the arp queue. So the sysctl net.inet.ip.arpqueued must be read only. In if_ether.c include the header with the decalration of la_hold_total to ensure that the definition matches.
ok? bluhm Index: netinet/if_ether.c =================================================================== RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/if_ether.c,v retrieving revision 1.243 diff -u -p -r1.243 if_ether.c --- netinet/if_ether.c 24 Jun 2020 22:03:43 -0000 1.243 +++ netinet/if_ether.c 23 Apr 2021 17:21:04 -0000 @@ -60,6 +60,7 @@ #include <netinet/in.h> #include <netinet/in_var.h> #include <netinet/if_ether.h> +#include <netinet/ip_var.h> #if NCARP > 0 #include <netinet/ip_carp.h> #endif Index: netinet/ip_input.c =================================================================== RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_input.c,v retrieving revision 1.356 diff -u -p -r1.356 ip_input.c --- netinet/ip_input.c 30 Mar 2021 08:37:10 -0000 1.356 +++ netinet/ip_input.c 23 Apr 2021 17:23:09 -0000 @@ -126,7 +126,6 @@ const struct sysctl_bounded_args ipctl_v { IPCTL_IPPORT_MAXQUEUE, &ip_maxqueue, 0, 10000 }, { IPCTL_MFORWARDING, &ipmforwarding, 0, 1 }, { IPCTL_MULTIPATH, &ipmultipath, 0, 1 }, - { IPCTL_ARPQUEUED, &la_hold_total, 0, 1000 }, { IPCTL_ARPTIMEOUT, &arpt_keep, 0, INT_MAX }, { IPCTL_ARPDOWN, &arpt_down, 0, INT_MAX }, }; @@ -1643,6 +1642,8 @@ ip_sysctl(int *name, u_int namelen, void case IPCTL_ARPQUEUE: return (sysctl_niq(name + 1, namelen - 1, oldp, oldlenp, newp, newlen, &arpinq)); + case IPCTL_ARPQUEUED: + return (sysctl_rdint(oldp, oldlenp, newp, la_hold_total)); case IPCTL_STATS: return (ip_sysctl_ipstat(oldp, oldlenp, newp)); #ifdef MROUTING