-/* $OpenBSD: icmp6.h,v 1.51 2021/01/11 13:28:53 bluhm Exp $ */
+/* $OpenBSD: icmp6.h,v 1.52 2023/04/05 21:51:47 bluhm Exp $ */
/* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */
/*
#define ICMPV6CTL_REDIRTIMEOUT 3 /* redirect cache time */
#define ICMPV6CTL_ND6_DELAY 8
#define ICMPV6CTL_ND6_UMAXTRIES 9
-#define ICMPV6CTL_ND6_MMAXTRIES 10
+#define ICMPV6CTL_ND6_MMAXTRIES 10
+#define ICMPV6CTL_ND6_QUEUED 11
#define ICMPV6CTL_NODEINFO 13
#define ICMPV6CTL_ERRPPSLIMIT 14 /* ICMPv6 error pps limitation */
#define ICMPV6CTL_ND6_MAXNUDHINT 15
{ "nd6_delay", CTLTYPE_INT }, \
{ "nd6_umaxtries", CTLTYPE_INT }, \
{ "nd6_mmaxtries", CTLTYPE_INT }, \
- { 0, 0 }, \
+ { "nd6_queued", CTLTYPE_INT }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "errppslimit", CTLTYPE_INT }, \
-/* $OpenBSD: if_ether.c,v 1.259 2023/04/05 19:35:23 bluhm Exp $ */
+/* $OpenBSD: if_ether.c,v 1.260 2023/04/05 21:51:47 bluhm Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
LIST_HEAD_INITIALIZER(arp_list); /* [mN] list of llinfo_arp structures */
struct pool arp_pool; /* [I] pool for llinfo_arp structures */
int arp_maxtries = 5; /* [I] arp requests before set to rejected */
-int la_hold_total; /* [a] packets currently in the arp queue */
+unsigned int la_hold_total; /* [a] packets currently in the arp queue */
#ifdef NFSCLIENT
/* revarp state */
-/* $OpenBSD: ip_input.c,v 1.382 2023/03/08 23:17:02 bluhm Exp $ */
+/* $OpenBSD: ip_input.c,v 1.383 2023/04/05 21:51:47 bluhm Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
return (sysctl_niq(name + 1, namelen - 1,
oldp, oldlenp, newp, newlen, &arpinq));
case IPCTL_ARPQUEUED:
- return (sysctl_rdint(oldp, oldlenp, newp, la_hold_total));
+ return (sysctl_rdint(oldp, oldlenp, newp,
+ atomic_load_int(&la_hold_total)));
case IPCTL_STATS:
return (ip_sysctl_ipstat(oldp, oldlenp, newp));
#ifdef MROUTING
-/* $OpenBSD: ip_var.h,v 1.108 2022/11/17 18:05:43 mvs Exp $ */
+/* $OpenBSD: ip_var.h,v 1.109 2023/04/05 21:51:47 bluhm Exp $ */
/* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */
/*
extern int ipmforwarding; /* enable multicast forwarding */
#endif
extern int ipmultipath; /* enable multipath routing */
-extern int la_hold_total;
+extern unsigned int la_hold_total;
extern const struct pr_usrreqs rip_usrreqs;
-/* $OpenBSD: icmp6.c,v 1.247 2022/12/10 23:45:51 kn Exp $ */
+/* $OpenBSD: icmp6.c,v 1.248 2023/04/05 21:51:47 bluhm Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
error = icmp6_sysctl_icmp6stat(oldp, oldlenp, newp);
break;
+ case ICMPV6CTL_ND6_QUEUED:
+ error = sysctl_rdint(oldp, oldlenp, newp,
+ atomic_load_int(&ln_hold_total));
+ break;
+
default:
NET_LOCK();
error = sysctl_bounded_arr(icmpv6ctl_vars,
-/* $OpenBSD: nd6.c,v 1.270 2023/04/05 19:35:23 bluhm Exp $ */
+/* $OpenBSD: nd6.c,v 1.271 2023/04/05 21:51:47 bluhm Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
TAILQ_HEAD(llinfo_nd6_head, llinfo_nd6) nd6_list;
struct pool nd6_pool; /* pool for llinfo_nd6 structures */
int nd6_inuse;
-int ln_hold_total; /* [a] packets currently in the nd6 queue */
+unsigned int ln_hold_total; /* [a] packets currently in the nd6 queue */
void nd6_timer(void *);
void nd6_slowtimo(void *);
-/* $OpenBSD: nd6.h,v 1.96 2023/04/05 19:35:23 bluhm Exp $ */
+/* $OpenBSD: nd6.h,v 1.97 2023/04/05 21:51:47 bluhm Exp $ */
/* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */
/*
#define LN_HOLD_QUEUE 10
#define LN_HOLD_TOTAL 100
-extern int ln_hold_total;
+extern unsigned int ln_hold_total;
#define ND6_LLINFO_PERMANENT(n) ((n)->ln_rt->rt_expire == 0)