freebsd-dev/sys/netinet
Bjoern A. Zeeb a4adf6cc65 Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros.
r354748-354750 replaced the KAME macros with m_pulldown() calls.
Contrary to the rest of the network stack m_len checks before m_pulldown()
were not put in placed (see r354748).
Put these m_len checks in place for now (to go along with the style of the
network stack since the initial commits).  These are not put in for
performance but to avoid an error scenario (even though it also will help
performance at the moment as it avoid allocating an extra mbuf; not because
of the unconditional function call).

The observed error case went like this:
(1) an mbuf with M_EXT arrives and we call m_pullup() unconditionally on it.
(2) m_pullup() will call m_get() unless the requested length is larger than
MHLEN (in which case it'll m_freem() the perfectly fine mbuf) and migrate the
requested length of data and pkthdr into the new mbuf.
(3) If m_get() succeeds, a further m_pullup() call going over MHLEN will fail.
This was observed with failing auto-configuration as an RA packet of
200 bytes exceeded MHLEN and the m_pullup() called from nd6_ra_input()
dropped the mbuf.
(Re-)adding the m_len checks before m_pullup() calls avoids this problems
with mbufs using external storage for now.

MFC after:	3 weeks
Sponsored by:	Netflix
2019-12-01 00:22:04 +00:00
..
cc Add boundary and overflow checks to the formulas used in the TCP CUBIC 2019-11-16 12:00:22 +00:00
khelp
libalias Separate kernel crc32() implementation to its own header (gsb_crc32.h) and 2019-06-17 19:49:08 +00:00
netdump Fix compile issues when building a kernel without the VIMAGE option. 2019-10-19 20:48:53 +00:00
tcp_stacks Now that all of the tcp_input() and all its branches are executed 2019-11-07 21:23:07 +00:00
accf_data.c
accf_dns.c
accf_http.c
icmp6.h
icmp_var.h
if_ether.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
if_ether.h
igmp_var.h
igmp.c Quickly fix up r353683: enter the epoch before calling into netisr_dispatch(). 2019-10-17 17:02:50 +00:00
igmp.h
in_cksum.c
in_debug.c
in_fib.c Existense of PCB route caching doesn't allow us to use new fast route 2019-05-08 23:39:24 +00:00
in_fib.h Existense of PCB route caching doesn't allow us to use new fast route 2019-05-08 23:39:24 +00:00
in_gif.c
in_jail.c
in_kdtrace.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
in_kdtrace.h Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
in_mcast.c in_mcast.c: need if_addr_lock around inm_release_deferred 2019-11-25 22:25:34 +00:00
in_pcb.c Since r353292 on input path we are always in network epoch, when 2019-11-07 20:49:56 +00:00
in_pcb.h Remove now unused INP_INFO_RLOCK macros. 2019-11-07 22:26:54 +00:00
in_pcbgroup.c
in_prot.c
in_proto.c
in_rmx.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
in_rss.c
in_rss.h
in_systm.h
in_var.h Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
in.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
in.h Rename IPPROTO 33 from SEP to DCCP 2019-08-08 11:43:09 +00:00
ip6.h Remove now unused IPv6 macros and update docs. 2019-11-15 21:55:41 +00:00
ip_carp.c Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros. 2019-12-01 00:22:04 +00:00
ip_carp.h
ip_divert.c Now that there is no R/W lock on PCB list the pcblist sysctls 2019-11-07 21:27:32 +00:00
ip_divert.h
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_encap.h
ip_fastfwd.c New pfil(9) KPI together with newborn pfil API and control utility. 2019-01-31 23:01:03 +00:00
ip_fw.h Add "tcpmss" opcode to match the TCP MSS value. 2019-06-21 10:54:51 +00:00
ip_gre.c Add GRE-in-UDP encapsulation support as defined in RFC8086. 2019-04-24 09:05:45 +00:00
ip_icmp.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_icmp.h
ip_id.c
ip_input.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_mroute.c Reduce the vnet_set module size of ip_mroute to allow loading as a module. 2019-11-19 15:38:55 +00:00
ip_mroute.h
ip_options.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_options.h
ip_output.c Revert most of the multicast changes from r353292. This needs a more 2019-10-09 17:03:20 +00:00
ip_reass.c Properly set VNET when nuking recvif from fragment queues. 2019-10-25 18:54:06 +00:00
ip_var.h This commit adds BBR (Bottleneck Bandwidth and RTT) congestion control. This 2019-09-24 18:18:11 +00:00
ip.h
pim_var.h
pim.h
raw_ip.c Now that there is no R/W lock on PCB list the pcblist sysctls 2019-11-07 21:27:32 +00:00
sctp_asconf.c Validate length before use it, not vice versa. 2019-10-08 11:07:16 +00:00
sctp_asconf.h
sctp_auth.c Only allow a SCTP-AUTH shared key to be updated by the application 2019-09-17 09:46:42 +00:00
sctp_auth.h
sctp_bsd_addr.c Use an event handler to notify the SCTP about IP address changes 2019-10-13 18:17:08 +00:00
sctp_bsd_addr.h Use an event handler to notify the SCTP about IP address changes 2019-10-13 18:17:08 +00:00
sctp_cc_functions.c Rename sctp_dtrace_declare.h to sctp_kdtrace.h for consistentcy. 2019-10-14 13:02:49 +00:00
sctp_constants.h
sctp_crc32.c When the IP layer calls back into the SCTP layer to perform the SCTP 2019-09-15 18:29:45 +00:00
sctp_crc32.h
sctp_header.h
sctp_indata.c Plumb an mbuf leak in a code path that should not be taken. Also avoid 2019-10-06 08:47:10 +00:00
sctp_indata.h Fix initialization of top_fsn. 2019-09-01 10:39:16 +00:00
sctp_input.c Plug two mbuf leaks during INIT-ACK handling. 2019-11-27 19:32:29 +00:00
sctp_input.h
sctp_kdtrace.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_kdtrace.h Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_lock_bsd.h
sctp_os_bsd.h Improve consistency. No functional change. 2019-08-05 13:22:15 +00:00
sctp_os.h
sctp_output.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_output.h Improve the handling of state cookie parameters in INIT-ACK chunks. 2019-09-01 10:09:53 +00:00
sctp_pcb.c Move SCTP DTrace probe definitions into a .c file. 2019-10-13 16:14:04 +00:00
sctp_pcb.h Store a handle for the event handler. This will be used when unloading the 2019-10-24 09:22:23 +00:00
sctp_peeloff.c
sctp_peeloff.h
sctp_ss_functions.c Initialize scheduler specific data for the FCFS scheduler. 2019-03-25 16:40:54 +00:00
sctp_structs.h Fix build issue for the userland stack. 2019-03-24 12:13:05 +00:00
sctp_syscalls.c
sctp_sysctl.c
sctp_sysctl.h
sctp_timer.c
sctp_timer.h
sctp_uio.h
sctp_usrreq.c Really ignore the SCTP association identifier on 1-to-1 style sockets 2019-11-28 12:50:25 +00:00
sctp_var.h
sctp.h Limit the size of messages sent on 1-to-many style SCTP sockets with the 2019-03-23 22:56:03 +00:00
sctputil.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctputil.h Cleanup the RTO calculation and perform some consistency checks 2019-09-22 10:40:15 +00:00
siftr.c In r343587 a simple port filter as sysctl tunable was added to siftr. 2019-10-07 20:35:04 +00:00
tcp_debug.c
tcp_debug.h
tcp_fastopen.c
tcp_fastopen.h
tcp_fsm.h
tcp_hostcache.c
tcp_hostcache.h
tcp_hpts.c In TCP HPTS enter the epoch in tcp_hpts_thread() and assert it in 2019-11-07 21:30:27 +00:00
tcp_hpts.h This commit updates rack to what is basically being used at NF as 2019-07-10 20:40:39 +00:00
tcp_input.c Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros. 2019-12-01 00:22:04 +00:00
tcp_log_buf.c Fix a small bug in the tcp_log_id where the bucket 2019-04-10 18:58:11 +00:00
tcp_log_buf.h This commit updates rack to what is basically being used at NF as 2019-07-10 20:40:39 +00:00
tcp_lro.c Mechanically convert INP_INFO_RLOCK() to NET_EPOCH_ENTER(). 2019-11-07 00:08:34 +00:00
tcp_lro.h This adds the final tweaks to LRO that will now allow me 2019-09-06 14:25:41 +00:00
tcp_offload.c Add a TOE KTLS mode and a TOE hook for allocating TLS sessions. 2019-10-08 21:34:06 +00:00
tcp_offload.h Add a TOE KTLS mode and a TOE hook for allocating TLS sessions. 2019-10-08 21:34:06 +00:00
tcp_output.c RFC 7112 requires a host to put the complete IP header chain 2019-09-29 10:45:13 +00:00
tcp_pcap.c Add an external mbuf buffer type that holds multiple unmapped pages. 2019-06-29 00:48:33 +00:00
tcp_pcap.h
tcp_ratelimit.c Factor out TCP rateset destruction code. 2019-10-09 17:08:40 +00:00
tcp_ratelimit.h Fix the ifdefs in tcp_ratelimit.h. They were reversed so 2019-09-24 20:04:31 +00:00
tcp_reass.c This patch addresses an issue brought up by bz@ in D18968: 2019-02-21 09:34:47 +00:00
tcp_sack.c Don't write to memory outside of the allocated array for SACK blocks. 2019-09-16 08:18:05 +00:00
tcp_seq.h
tcp_subr.c Now that there is no R/W lock on PCB list the pcblist sysctls 2019-11-07 21:27:32 +00:00
tcp_syncache.c Now that there is no R/W lock on PCB list the pcblist sysctls 2019-11-07 21:27:32 +00:00
tcp_syncache.h Now that there is no R/W lock on PCB list the pcblist sysctls 2019-11-07 21:27:32 +00:00
tcp_timer.c TCP timers are executed in callout context, so they need to enter network 2019-11-07 00:27:23 +00:00
tcp_timer.h Add sysctl variable net.inet.tcp.rexmit_initial for setting RTO.Initial 2019-03-23 21:36:59 +00:00
tcp_timewait.c Mechanically convert INP_INFO_RLOCK() to NET_EPOCH_ENTER() in TCP 2019-11-07 21:29:38 +00:00
tcp_usrreq.c Mechanically convert INP_INFO_RLOCK() to NET_EPOCH_ENTER() in 2019-11-07 00:10:14 +00:00
tcp_var.h This adds in the missing counter initialization which 2019-09-06 18:29:48 +00:00
tcp.h Add a TOE KTLS mode and a TOE hook for allocating TLS sessions. 2019-10-08 21:34:06 +00:00
tcpip.h
toecore.c Mechanically convert INP_INFO_RLOCK() to NET_EPOCH_ENTER(). 2019-11-07 00:08:34 +00:00
toecore.h Add a TOE KTLS mode and a TOE hook for allocating TLS sessions. 2019-10-08 21:34:06 +00:00
udp_usrreq.c Now that there is no R/W lock on PCB list the pcblist sysctls 2019-11-07 21:27:32 +00:00
udp_var.h
udp.h
udplite.h