]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add a queue to hold packets while we await an ARP reply.
authorGeorge V. Neville-Neil <gnn@FreeBSD.org>
Fri, 12 Nov 2010 22:03:02 +0000 (22:03 +0000)
committerGeorge V. Neville-Neil <gnn@FreeBSD.org>
Fri, 12 Nov 2010 22:03:02 +0000 (22:03 +0000)
commite162ea60d49479a41ede3384aa665f556b1f1b56
treef52ab575cd1d1ee7966a7b191d553abe09ed23f5
parent729850d91988b35b2ef084b9bd3e48414a6e8c86
Add a queue to hold packets while we await an ARP reply.

When a fast machine first brings up some non TCP networking program
it is quite possible that we will drop packets due to the fact that
only one packet can be held per ARP entry.  This leads to packets
being missed when a program starts or restarts if the ARP data is
not currently in the ARP cache.

This code adds a new sysctl, net.link.ether.inet.maxhold, which defines
a system wide maximum number of packets to be held in each ARP entry.
Up to maxhold packets are queued until an ARP reply is received or
the ARP times out.  The default setting is the old value of 1
which has been part of the BSD networking code since time
immemorial.

Expose the time we hold an incomplete ARP entry by adding
the sysctl net.link.ether.inet.wait, which defaults to 20
seconds, the value used when the new ARP code was added..

Reviewed by: bz, rpaulo
MFC after: 3 weeks
sys/net/if_llatbl.c
sys/net/if_llatbl.h
sys/netinet/if_ether.c
sys/netinet/in.c
tools/regression/netinet/arphold/Makefile [new file with mode: 0644]
tools/regression/netinet/arphold/arphold.c [new file with mode: 0644]
tools/regression/netinet/arphold/arphold.t [new file with mode: 0644]