aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2021-01-11 19:50:21 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2021-01-11 19:51:11 +0000
commit0da3f8c98d17d9c6e67d0f6cf45085df6a5ef041 (patch)
tree350c25dc8b56169d6c95c8e01fa4a397d55b5e43 /sys/netinet
parentd7a7d6a7c3c6a9b6e03e4739df6801e2a0a296e9 (diff)
downloadsrc-0da3f8c98d17d9c6e67d0f6cf45085df6a5ef041.tar.gz
src-0da3f8c98d17d9c6e67d0f6cf45085df6a5ef041.zip
Bump amount of queued packets in for unresolved ARP/NDP entries to 16.
Currently default behaviour is to keep only 1 packet per unresolved entry. Ability to queue more than one packet was added 10 years ago, in r215207, though the default value was kep intact. Things have changed since that time. Systems tend to initiate multiple connections at once for a variety of reasons. For example, recent kern/252278 bug report describe happy-eyeball DNS behaviour sending multiple requests to the DNS server. The primary driver for upper value for the queue length determination is memory consumption. Remote actors should not be able to easily exhaust local memory by sending packets to unresolved arp/ND entries. For now, bump value to 16 packets, to match Darwin implementation. The proper approach would be to switch the limit to calculate memory consumption instead of packet count and limit based on memory. We should MFC this with a variation of D22447. Reviewers: #manpages, #network, bz, emaste Reviewed By: emaste, gbe(doc), jilles(doc) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D28068
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 972701369d13..e09ad3d47382 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -114,7 +114,7 @@ VNET_PCPUSTAT_SYSINIT(arpstat);
VNET_PCPUSTAT_SYSUNINIT(arpstat);
#endif /* VIMAGE */
-VNET_DEFINE_STATIC(int, arp_maxhold) = 1;
+VNET_DEFINE_STATIC(int, arp_maxhold) = 16;
#define V_arpt_keep VNET(arpt_keep)
#define V_arpt_down VNET(arpt_down)