freebsd-skq/sys/netinet
Bjoern A. Zeeb cc7e9d4325 In case an upper layer protocol tries to send a packet but the
L2 code does not have the ethernet address for the destination
within the broadcast domain in the table, we remember the
original mbuf in `la_hold' in arpresolve() and send out a
different packet with an arp request.
In case there will be more upper layer packets to send we will
free an earlier one held in `la_hold' and queue the new one.

Once we get a packet in, with which we can perfect our arp table
entry we send out the original 'on hold' packet, should there
be any.
Rather than continuing to process the packet that we received,
we returned without freeing the packet that came in, which
basically means that we leaked an mbuf for every arp request
we sent.

Rather than freeing the received packet and returning, continue
to process the incoming arp packet as well.
This should (a) improve some setups, also proxy-arp, in case it was an
incoming arp request and (b) resembles the behaviour FreeBSD had
from day 1, which alignes with RFC826 "Packet reception" (merge case).

Rename 'm0' to 'hold' to make the code more understandable as
well as diffable to earlier versions more easily.

Handle the link-layer entry 'la' lock comepletely in the block
where needed and release it as early as possible, rather than
holding it longer, down to the end of the function.

Found by:			pointyhat, ns1
Bug hunting session with:	erwin, simon, rwatson
Tested by:			simon on cluster machines
Reviewed by:			ratson, kmacy, julian
MFC after:			3 days
2009-09-01 17:53:01 +00:00
..
ipfw Fix another typo right next to the previous one, that amazingly, I did 2009-08-23 08:49:32 +00:00
libalias
accf_data.c Rework socket upcalls to close some races with setup/teardown of upcalls. 2009-06-01 21:17:03 +00:00
accf_dns.c Rework socket upcalls to close some races with setup/teardown of upcalls. 2009-06-01 21:17:03 +00:00
accf_http.c Rework socket upcalls to close some races with setup/teardown of upcalls. 2009-06-01 21:17:03 +00:00
icmp6.h Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
icmp_var.h Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
if_atm.c
if_atm.h
if_ether.c In case an upper layer protocol tries to send a packet but the 2009-09-01 17:53:01 +00:00
if_ether.h
igmp_var.h
igmp.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
igmp.h These are no longer referenced in the tree, so can be safely removed. 2009-06-10 18:12:15 +00:00
in_cksum.c
in_gif.c Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
in_gif.h
in_mcast.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
in_pcb.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
in_pcb.h Add padding to struct inpcb, missed during our padding sweep earlier in 2009-08-02 22:47:08 +00:00
in_proto.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
in_rmx.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
in_systm.h
in_var.h Remove unused VNET_SET() and related macros; only VNET_GET() is 2009-07-16 21:13:04 +00:00
in.c This patch fixes the following issues: 2009-08-31 21:02:48 +00:00
in.h - Rename IP_NONLOCALOK IP socket option to IP_BINDANY, to be more consistent 2009-06-01 10:30:00 +00:00
ip6.h
ip_carp.c Fix CARP memory leaks on carp_if's malloc'd using M_CARP. This occurs when 2009-08-20 02:33:12 +00:00
ip_carp.h
ip_divert.c Introduce a div_destroy() function which takes over per-vnet cleanup tasks 2009-08-24 10:06:02 +00:00
ip_divert.h Introduce a div_destroy() function which takes over per-vnet cleanup tasks 2009-08-24 10:06:02 +00:00
ip_dummynet.h - fix dummynet 'fast' mode for WF2Q case. 2009-06-24 22:57:07 +00:00
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_fastfwd.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
ip_fw.h Fix ipfw's initialization functions to get the correct order of evaluation 2009-08-21 11:20:10 +00:00
ip_gre.c
ip_gre.h
ip_icmp.c Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
ip_icmp.h
ip_id.c
ip_input.c Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
ip_ipsec.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
ip_ipsec.h Only four out of nine arguments for ip_ipsec_output() are actually used. 2009-06-05 23:53:17 +00:00
ip_mroute.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
ip_mroute.h Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
ip_options.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
ip_options.h
ip_output.c Do not try to free the rt_lle entry of the cached route in 2009-08-28 05:37:31 +00:00
ip_var.h Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
ip.h
pim_var.h
pim.h
raw_ip.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
sctp_asconf.c
sctp_asconf.h
sctp_auth.c Turns out that when a receiver forwards through its TNS's the 2009-07-28 14:09:06 +00:00
sctp_auth.h
sctp_bsd_addr.c Fix a bug where vlan interfaces are not supported by SCTP. 2009-08-28 08:41:59 +00:00
sctp_bsd_addr.h
sctp_cc_functions.c
sctp_cc_functions.h
sctp_constants.h
sctp_crc32.c repository sync to multi-OS repo ... spaceing change 2009-05-07 16:43:49 +00:00
sctp_crc32.h
sctp_header.h
sctp_indata.c This fixes a bug where the value set by SCTP_PARTIAL_DELIVERY_POINT 2009-08-24 11:46:40 +00:00
sctp_indata.h
sctp_input.c * Fix a bug where PR-SCTP settings are ignore when using implicit 2009-08-15 21:10:52 +00:00
sctp_input.h
sctp_lock_bsd.h
sctp_os_bsd.h SCTP is not yet compatible with options VIMAGE kernels although it compiles 2009-08-14 22:43:25 +00:00
sctp_os.h
sctp_output.c Fix a crash when using one-to-one stlye socket in non-blocking 2009-08-18 19:58:49 +00:00
sctp_output.h
sctp_pcb.c * Fix a bug where PR-SCTP settings are ignore when using implicit 2009-08-15 21:10:52 +00:00
sctp_pcb.h
sctp_peeloff.c
sctp_peeloff.h
sctp_structs.h
sctp_sysctl.c Fix a bug where wrong initialization value 2009-07-28 15:07:41 +00:00
sctp_sysctl.h Fix a bug where wrong initialization value 2009-07-28 15:07:41 +00:00
sctp_timer.c * Fix a bug where PR-SCTP settings are ignore when using implicit 2009-08-15 21:10:52 +00:00
sctp_timer.h
sctp_uio.h Get rid of unused field. This will also be deleted 2009-07-27 12:09:32 +00:00
sctp_usrreq.c
sctp_var.h
sctp.h Changes to the NR-Sack code so that: 2009-06-17 12:34:56 +00:00
sctputil.c Fix a bug in the handling of unreliable messages 2009-08-19 12:02:28 +00:00
sctputil.h * Fix a bug where PR-SCTP settings are ignore when using implicit 2009-08-15 21:10:52 +00:00
tcp_debug.c Remove the "The option TCPDEBUG requires option INET." requirement. 2009-06-10 10:39:41 +00:00
tcp_debug.h
tcp_fsm.h
tcp_hostcache.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_hostcache.h
tcp_input.c Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
tcp_lro.c
tcp_lro.h
tcp_offload.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_offload.h Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface to 2009-07-13 11:51:02 +00:00
tcp_output.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_reass.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_sack.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_seq.h
tcp_subr.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_syncache.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_syncache.h Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface to 2009-07-13 11:51:02 +00:00
tcp_timer.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_timer.h
tcp_timewait.c Fix signed comparison bug when ticks goes negative after 24 days of 2009-08-20 22:53:28 +00:00
tcp_usrreq.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
tcp_var.h Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
tcp.h
tcpip.h
toedev.h
udp_usrreq.c Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
udp_var.h Many network stack subsystems use a single global data structure to hold 2009-08-02 19:43:32 +00:00
udp.h Added support for NAT-Traversal (RFC 3948) in IPsec stack. 2009-06-12 15:44:35 +00:00