diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-04-05 19:35:24 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-04-05 19:35:24 +0000 |
commit | 97d8da8a6b1f8ca43457237826312668a9f2005f (patch) | |
tree | b0d8cc7b8e2ff4be6e7a69d96bb791a66b1870ee /sys/netinet6/nd6.h | |
parent | f66b0bcf425f92dab3e05058b6b12849a4ff3cf4 (diff) |
ARP has a queue of packets that should be sent after name resolution.
ND6 did only hold a single packet. Unify the logic and add a mbuf
hold queue to struct llinfo_nd6. This is MP safe and queue limits
are tracked with atomic operations. New function if_mqoutput() has
common code for ARP and ND6. ln_saddr6 holds the source address
of the requesting packet. That is easier than fiddling with mbuf
queue in nd6_ns_output().
OK kn@
Diffstat (limited to 'sys/netinet6/nd6.h')
-rw-r--r-- | sys/netinet6/nd6.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index d63023c5eb9..b3c2be97bcb 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.h,v 1.95 2023/01/06 14:35:34 kn Exp $ */ +/* $OpenBSD: nd6.h,v 1.96 2023/04/05 19:35:23 bluhm Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -81,12 +81,17 @@ struct in6_ndireq { struct llinfo_nd6 { TAILQ_ENTRY(llinfo_nd6) ln_list; struct rtentry *ln_rt; - struct mbuf *ln_hold; /* last packet until resolved/timeout */ + struct mbuf_queue ln_mq; /* hold packets until resolved */ + struct in6_addr ln_saddr6; /* source of prompting packet */ long ln_asked; /* number of queries already sent for addr */ int ln_byhint; /* # of times we made it reachable by UL hint */ short ln_state; /* reachability state */ short ln_router; /* 2^0: ND6 router bit */ }; +#define LN_HOLD_QUEUE 10 +#define LN_HOLD_TOTAL 100 + +extern int ln_hold_total; #define ND6_LLINFO_PERMANENT(n) ((n)->ln_rt->rt_expire == 0) |