CVS log for src/sys/netinet/tcp_usrreq.c
Up to [FreeBSD] / src / sys / netinet
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.192.2.8: download - view: text, markup, annotated - select for diffs
Mon Feb 6 18:47:07 2012 UTC (4 days ago) by np
Branches: RELENG_8
Diff to: previous 1.192.2.7: preferred, colored; branchpoint 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192.2.7: +3 -1 lines
SVN rev 231097 on 2012-02-06 18:47:07Z by np MFC r229714 Always release the inp lock before returning from tcp_detach.
Revision 1.204.2.2: download - view: text, markup, annotated - select for diffs
Mon Feb 6 18:46:49 2012 UTC (4 days ago) by np
Branches: RELENG_9
Diff to: previous 1.204.2.1: preferred, colored; branchpoint 1.204: preferred, colored; next MAIN 1.205: preferred, colored
Changes since revision 1.204.2.1: +3 -1 lines
SVN rev 231096 on 2012-02-06 18:46:49Z by np MFC r229714 Always release the inp lock before returning from tcp_detach.
Revision 1.209: download - view: text, markup, annotated - select for diffs
Sun Feb 5 16:53:02 2012 UTC (5 days, 1 hour ago) by glebius
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +58 -3 lines
SVN rev 231025 on 2012-02-05 16:53:02Z by glebius Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT, that allow to control initial timeout, idle time, idle re-send interval and idle send count on a per-socket basis. Reviewed by: andre, bz, lstewart
Revision 1.208: download - view: text, markup, annotated - select for diffs
Fri Jan 6 18:29:40 2012 UTC (5 weeks ago) by np
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +3 -1 lines
SVN rev 229714 on 2012-01-06 18:29:40Z by np Always release the inp lock before returning from tcp_detach. MFC after: 5 days
Revision 1.204.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (3 months ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.204.2.1: preferred, colored; next MAIN 1.204.2.2: preferred, colored
Changes since revision 1.204.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.207: download - view: text, markup, annotated - select for diffs
Sun Oct 16 20:18:39 2011 UTC (3 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +0 -14 lines
SVN rev 226448 on 2011-10-16 20:18:39Z by andre Move the tcp_sendspace and tcp_recvspace sysctl's from the middle of tcp_usrreq.c to the top of tcp_output.c and tcp_input.c respectively next to the socket buffer autosizing controls. MFC after: 1 week
Revision 1.206: download - view: text, markup, annotated - select for diffs
Sun Oct 16 15:08:43 2011 UTC (3 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +10 -7 lines
SVN rev 226437 on 2011-10-16 15:08:43Z by andre VNET virtualize tcp_sendspace/tcp_recvspace and change the type to INT. A long is not necessary as the TCP window is limited to 2**30. A larger initial window isn't useful. MFC after: 1 week
Revision 1.205: download - view: text, markup, annotated - select for diffs
Sun Oct 16 13:54:46 2011 UTC (3 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +4 -5 lines
SVN rev 226433 on 2011-10-16 13:54:46Z by andre Update the comment and description of tcp_sendspace and tcp_recvspace to better reflect their purpose. MFC after: 1 week
Revision 1.204.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.204: download - view: text, markup, annotated - select for diffs
Thu Jun 2 10:21:05 2011 UTC (8 months, 1 week ago) by rwatson
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +1 -1 lines
SVN rev 222602 on 2011-06-02 10:21:05Z by rwatson Do not leak the pcbinfohash lock in the case where in6_pcbladdr() returns an error during TCP connect(2) on an IPv6 socket. Submitted by: bz Sponsored by: Juniper Networks, Inc.
Revision 1.203: download - view: text, markup, annotated - select for diffs
Mon May 30 09:43:55 2011 UTC (8 months, 1 week ago) by rwatson
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +51 -45 lines
SVN rev 222488 on 2011-05-30 09:43:55Z by rwatson Decompose the current single inpcbinfo lock into two locks: - The existing ipi_lock continues to protect the global inpcb list and inpcb counter. This lock is now relegated to a small number of allocation and free operations, and occasional operations that walk all connections (including, awkwardly, certain UDP multicast receive operations -- something to revisit). - A new ipi_hash_lock protects the two inpcbinfo hash tables for looking up connections and bound sockets, manipulated using new INP_HASH_*() macros. This lock, combined with inpcb locks, protects the 4-tuple address space. Unlike the current ipi_lock, ipi_hash_lock follows the individual inpcb connection locks, so may be acquired while manipulating a connection on which a lock is already held, avoiding the need to acquire the inpcbinfo lock preemptively when a binding change might later be required. As a result, however, lookup operations necessarily go through a reference acquire while holding the lookup lock, later acquiring an inpcb lock -- if required. A new function in_pcblookup() looks up connections, and accepts flags indicating how to return the inpcb. Due to lock order changes, callers no longer need acquire locks before performing a lookup: the lookup routine will acquire the ipi_hash_lock as needed. In the future, it will also be able to use alternative lookup and locking strategies transparently to callers, such as pcbgroup lookup. New lookup flags are, supplementing the existing INPLOOKUP_WILDCARD flag: INPLOOKUP_RLOCKPCB - Acquire a read lock on the returned inpcb INPLOOKUP_WLOCKPCB - Acquire a write lock on the returned inpcb Callers must pass exactly one of these flags (for the time being). Some notes: - All protocols are updated to work within the new regime; especially, TCP, UDPv4, and UDPv6. pcbinfo ipi_lock acquisitions are largely eliminated, and global hash lock hold times are dramatically reduced compared to previous locking. - The TCP syncache still relies on the pcbinfo lock, something that we may want to revisit. - Support for reverting to the FreeBSD 7.x locking strategy in TCP input is no longer available -- hash lookup locks are now held only very briefly during inpcb lookup, rather than for potentially extended periods. However, the pcbinfo ipi_lock will still be acquired if a connection state might change such that a connection is added or removed. - Raw IP sockets continue to use the pcbinfo ipi_lock for protection, due to maintaining their own hash tables. - The interface in6_pcblookup_hash_locked() is maintained, which allows callers to acquire hash locks and perform one or more lookups atomically with 4-tuple allocation: this is required only for TCPv6, as there is no in6_pcbconnect_setup(), which there should be. - UDPv6 locking remains significantly more conservative than UDPv4 locking, which relates to source address selection. This needs attention, as it likely significantly reduces parallelism in this code for multithreaded socket use (such as in BIND). - In the UDPv4 and UDPv6 multicast cases, we need to revisit locking somewhat, as they relied on ipi_lock to stablise 4-tuple matches, which is no longer sufficient. A second check once the inpcb lock is held should do the trick, keeping the general case from requiring the inpcb lock for every inpcb visited. - This work reminds us that we need to revisit locking of the v4/v6 flags, which may be accessed lock-free both before and after this change. - Right now, a single lock name is used for the pcbhash lock -- this is undesirable, and probably another argument is required to take care of this (or a char array name field in the pcbinfo?). This is not an MFC candidate for 8.x due to its impact on lookup and locking semantics. It's possible some of these issues could be worked around with compatibility wrappers, if necessary. Reviewed by: bz Sponsored by: Juniper Networks, Inc.
Revision 1.192.2.7: download - view: text, markup, annotated - select for diffs
Sat May 28 04:40:35 2011 UTC (8 months, 2 weeks ago) by lstewart
Branches: RELENG_8
Diff to: previous 1.192.2.6: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.2.6: +61 -1 lines
SVN rev 222401 on 2011-05-28 04:40:35Z by lstewart
MFC r215166,215377,215391,215392,215393,215395,216101,216103,216105,216107,
216749,216760,217748,218167:
- Add a KPI and supporting infrastructure to allow modular congestion control
algorithms to be used in the net stack. Algorithms can maintain per-connection
state if required, and connections maintain their own algorithm pointer, which
allows different connections to concurrently use different algorithms. The
TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to
programmatically query or change the congestion control algorithm respectively
from within an application at runtime.
- Integrate the framework with the TCP stack in as least intrusive a manner as
possible. Care was also taken to develop the framework in a way that should
allow integration with other congestion aware transport protocols (e.g. SCTP)
in the future. The hope is that we will one day be able to share a single set
of congestion control algorithm modules between all congestion aware transport
protocols.
- Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack
and use it to decouple the meaning of recovery from a congestion event and
recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based
congestion control protocols don't generally need to recover from packet loss
and need a different way to note a congestion recovery episode within the
stack.
- Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code
and ensures the stack always uses the appropriate mechanisms for recovering
from packet loss during a congestion recovery episode.
- Extract the NewReno congestion control algorithm from the TCP stack and
massage it into module form. NewReno is always built into the kernel and will
remain the default algorithm for the forseeable future. Implementations of
additional different algorithms will become available in the near future.
- Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect
to "struct tcpcb" by consuming some of the padding within the struct.
- Bump __FreeBSD_version to 802504.
In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: Cisco URP, FreeBSD Foundation
Reviewed by: rpaulo (r215166), bz (r215391,215395,216749,217748)
Tested by: David Hayes (r215166), trociny (r215377,215391,215392,215395)
Revision 1.202: download - view: text, markup, annotated - select for diffs
Sat Apr 30 11:21:29 2011 UTC (9 months, 1 week ago) by bz
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +39 -13 lines
SVN rev 221250 on 2011-04-30 11:21:29Z by bz Make the TCP code compile without INET. Sort #includes and add #ifdef INETs. Add some comments at #endifs given more nestedness. To make the compiler happy, some default initializations were added in accordance with the style on the files. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 4 days
Revision 1.163.2.20: download - view: text, markup, annotated - select for diffs
Tue Feb 15 09:28:07 2011 UTC (11 months, 3 weeks ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.19: preferred, colored; branchpoint 1.163: preferred, colored; next MAIN 1.164: preferred, colored
Changes since revision 1.163.2.19: +0 -4 lines
SVN rev 218703 on 2011-02-15 09:28:07Z by bz MFC r218078: Remove duplicate printing of TF_NOPUSH in db_print_tflags().
Revision 1.192.2.6: download - view: text, markup, annotated - select for diffs
Mon Feb 14 16:36:02 2011 UTC (11 months, 3 weeks ago) by bz
Branches: RELENG_8
Diff to: previous 1.192.2.5: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.2.5: +0 -4 lines
SVN rev 218682 on 2011-02-14 16:36:02Z by bz MFC r218078: Remove duplicate printing of TF_NOPUSH in db_print_tflags().
Revision 1.163.2.18.4.2: download - view: text, markup, annotated - select for diffs
Fri Feb 11 15:15:08 2011 UTC (11 months, 4 weeks ago) by jhb
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.163.2.18.4.1: preferred, colored; branchpoint 1.163.2.18: preferred, colored; next MAIN 1.163.2.19: preferred, colored
Changes since revision 1.163.2.18.4.1: +3 -2 lines
SVN rev 218576 on 2011-02-11 15:15:08Z by jhb MFC 218271: When turning off TCP_NOPUSH, only call tcp_output() to immediately flush any pending data if the connection is established. Approved by: re (kib)
Revision 1.192.2.3.4.2: download - view: text, markup, annotated - select for diffs
Fri Feb 11 15:14:51 2011 UTC (11 months, 4 weeks ago) by jhb
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.192.2.3.4.1: preferred, colored; branchpoint 1.192.2.3: preferred, colored; next MAIN 1.192.2.4: preferred, colored
Changes since revision 1.192.2.3.4.1: +3 -2 lines
SVN rev 218575 on 2011-02-11 15:14:51Z by jhb MFC 218271: When turning off TCP_NOPUSH, only call tcp_output() to immediately flush any pending data if the connection is established. Approved by: re (kib)
Revision 1.163.2.19: download - view: text, markup, annotated - select for diffs
Fri Feb 11 15:13:03 2011 UTC (11 months, 4 weeks ago) by jhb
Branches: RELENG_7
Diff to: previous 1.163.2.18: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.18: +3 -2 lines
SVN rev 218574 on 2011-02-11 15:13:03Z by jhb MFC 218271: When turning off TCP_NOPUSH, only call tcp_output() to immediately flush any pending data if the connection is established.
Revision 1.192.2.5: download - view: text, markup, annotated - select for diffs
Fri Feb 11 15:12:31 2011 UTC (11 months, 4 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.192.2.4: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.2.4: +3 -2 lines
SVN rev 218573 on 2011-02-11 15:12:31Z by jhb MFC 218271: When turning off TCP_NOPUSH, only call tcp_output() to immediately flush any pending data if the connection is established.
Revision 1.201: download - view: text, markup, annotated - select for diffs
Fri Feb 4 14:13:15 2011 UTC (12 months ago) by jhb
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +3 -2 lines
SVN rev 218271 on 2011-02-04 14:13:15Z by jhb When turning off TCP_NOPUSH, only call tcp_output() to immediately flush any pending data if the connection is established. Submitted by: csjp Reviewed by: lstewart MFC after: 1 week
Revision 1.200: download - view: text, markup, annotated - select for diffs
Sat Jan 29 22:11:13 2011 UTC (12 months, 1 week ago) by bz
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +0 -4 lines
SVN rev 218078 on 2011-01-29 22:11:13Z by bz Remove duplicate printing of TF_NOPUSH in db_print_tflags(). MFC after: 10 days
Revision 1.199: download - view: text, markup, annotated - select for diffs
Fri Jan 7 21:40:34 2011 UTC (13 months ago) by jhb
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +1 -1 lines
SVN rev 217126 on 2011-01-07 21:40:34Z by jhb Trim extra spaces before tabs.
Revision 1.192.2.4: download - view: text, markup, annotated - select for diffs
Tue Jan 4 18:27:00 2011 UTC (13 months ago) by gnn
Branches: RELENG_8
Diff to: previous 1.192.2.3: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.2.3: +3 -0 lines
SVN rev 216968 on 2011-01-04 18:27:00Z by gnn MFC: 215434, 215724 Add new, per connection, statistics for TCP, including: Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1).
Revision 1.163.2.18.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
Diff to: previous 1.163.2.18: preferred, colored
Changes since revision 1.163.2.18: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.192.2.3.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
Diff to: previous 1.192.2.3: preferred, colored
Changes since revision 1.192.2.3: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.198: download - view: text, markup, annotated - select for diffs
Wed Nov 17 18:55:12 2010 UTC (14 months, 3 weeks ago) by gnn
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +3 -0 lines
SVN rev 215434 on 2010-11-17 18:55:12Z by gnn Add new, per connection, statistics for TCP, including: Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after: 2 weeks
Revision 1.197: download - view: text, markup, annotated - select for diffs
Fri Nov 12 06:41:55 2010 UTC (14 months, 4 weeks ago) by lstewart
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +61 -1 lines
SVN rev 215166 on 2010-11-12 06:41:55Z by lstewart This commit marks the first formal contribution of the "Five New TCP Congestion Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ - Add a KPI and supporting infrastructure to allow modular congestion control algorithms to be used in the net stack. Algorithms can maintain per-connection state if required, and connections maintain their own algorithm pointer, which allows different connections to concurrently use different algorithms. The TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to programmatically query or change the congestion control algorithm respectively from within an application at runtime. - Integrate the framework with the TCP stack in as least intrusive a manner as possible. Care was also taken to develop the framework in a way that should allow integration with other congestion aware transport protocols (e.g. SCTP) in the future. The hope is that we will one day be able to share a single set of congestion control algorithm modules between all congestion aware transport protocols. - Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack and use it to decouple the meaning of recovery from a congestion event and recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based congestion control protocols don't generally need to recover from packet loss and need a different way to note a congestion recovery episode within the stack. - Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code and ensures the stack always uses the appropriate mechanisms for recovering from packet loss during a congestion recovery episode. - Extract the NewReno congestion control algorithm from the TCP stack and massage it into module form. NewReno is always built into the kernel and will remain the default algorithm for the forseeable future. Implementations of additional different algorithms will become available in the near future. - Bump __FreeBSD_version to 900025 and note in UPDATING that rebuilding code that relies on the size of "struct tcpcb" is required. Many thanks go to the Cisco University Research Program Fund at Community Foundation Silicon Valley and the FreeBSD Foundation. Their support of our work at the Centre for Advanced Internet Architectures, Swinburne University of Technology is greatly appreciated. In collaboration with: David Hayes <dahayes at swin edu au> and Grenville Armitage <garmitage at swin edu au> Sponsored by: Cisco URP, FreeBSD Foundation Reviewed by: rpaulo Tested by: David Hayes (and many others over the years) MFC after: 3 months
Revision 1.196: download - view: text, markup, annotated - select for diffs
Thu Sep 16 21:06:45 2010 UTC (16 months, 3 weeks ago) by andre
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +9 -13 lines
SVN rev 212765 on 2010-09-16 21:06:45Z by andre Remove the TCP inflight bandwidth limiter as announced in r211315 to give way for the pluggable congestion control framework. It is the task of the congestion control algorithm to set the congestion window and amount of inflight data without external interference. In 'struct tcpcb' the variables previously used by the inflight limiter are renamed to spares to keep the ABI intact and to have some more space for future extensions. In 'struct tcp_info' the variable 'tcpi_snd_bwnd' is not removed to preserve the ABI. It is always set to 0. In siftr.c in 'struct pkt_node' the variable 'snd_bwnd' is not removed to preserve the ABI. It is always set to 0. These unused variable in the various structures may be reused in the future or garbage collected before the next release or at some other point when an ABI change happens anyway for other reasons. No MFC is planned. The inflight bandwidth limiter stays disabled by default in the other branches but remains available.
Revision 1.192.2.3.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.192.2.3: preferred, colored; next MAIN 1.192.2.4: preferred, colored
Changes since revision 1.192.2.3: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.192.2.3: download - view: text, markup, annotated - select for diffs
Tue Jun 1 14:21:24 2010 UTC (20 months, 1 week ago) by rwatson
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP
Branch point for: RELENG_8_2, RELENG_8_1
Diff to: previous 1.192.2.2: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.2.2: +9 -3 lines
SVN rev 208700 on 2010-06-01 14:21:24Z by rwatson Merge r204809 from head to stable/8: Add a comment to tcp_usr_accept() to indicate why it is we acquire the tcbinfo lock there: r175612, which re-added it, masked a race between sonewconn(2) and accept(2) that could allow an incompletely initialized address on a newly-created socket on a listen queue to be exposed. Full details can be found in that commit message. Sponsored by: Juniper Networks Approved by: re (bz)
Revision 1.195: download - view: text, markup, annotated - select for diffs
Sat Mar 6 21:38:31 2010 UTC (23 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +9 -3 lines
SVN rev 204809 on 2010-03-06 21:38:31Z by rwatson Add a comment to tcp_usr_accept() to indicate why it is we acquire the tcbinfo lock there: r175612, which re-added it, masked a race between sonewconn(2) and accept(2) that could allow an incompletely initialized address on a newly-created socket on a listen queue to be exposed. Full details can be found in that commit message. MFC after: 1 week Sponsored by: Juniper Networks
Revision 1.163.2.18.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.163.2.18: preferred, colored; next MAIN 1.163.2.19: preferred, colored
Changes since revision 1.163.2.18: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.163.2.18: download - view: text, markup, annotated - select for diffs
Sun Jan 24 10:08:54 2010 UTC (2 years ago) by bz
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP
Branch point for: RELENG_7_4, RELENG_7_3
Diff to: previous 1.163.2.17: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.17: +3 -3 lines
SVN rev 202914 on 2010-01-24 10:08:54Z by bz MFC r194777: Make callers to in6_selectsrc() and in6_pcbladdr() pass in memory to save the selected source address rather than returning an unreferenced copy to a pointer that might long be gone by the time we use the pointer for anything meaningful. Asked for by: rwatson Reviewed by: rwatson Approved by: re (kensmith)
Revision 1.163.2.17: download - view: text, markup, annotated - select for diffs
Tue Jan 5 17:04:39 2010 UTC (2 years, 1 month ago) by jhb
Branches: RELENG_7
Diff to: previous 1.163.2.16: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.16: +7 -5 lines
SVN rev 201594 on 2010-01-05 17:04:39Z by jhb MFC 200847: - Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to remove the leading underscores since they are now implemented. - Implement the tcpi_rto and tcpi_last_data_recv fields in the tcp_info structure.
Revision 1.192.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 5 17:04:14 2010 UTC (2 years, 1 month ago) by jhb
Branches: RELENG_8
Diff to: previous 1.192.2.1: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.2.1: +4 -2 lines
SVN rev 201593 on 2010-01-05 17:04:14Z by jhb MFC 200847: - Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to remove the leading underscores since they are now implemented. - Implement the tcpi_rto and tcpi_last_data_recv fields in the tcp_info structure.
Revision 1.194: download - view: text, markup, annotated - select for diffs
Tue Dec 22 15:47:40 2009 UTC (2 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +4 -2 lines
SVN rev 200847 on 2009-12-22 15:47:40Z by jhb - Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to remove the leading underscores since they are now implemented. - Implement the tcpi_rto and tcpi_last_data_recv fields in the tcp_info structure. Reviewed by: rwatson MFC after: 2 weeks
Revision 1.192.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.192.2.1: preferred, colored; next MAIN 1.192.2.2: preferred, colored
Changes since revision 1.192.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.193: download - view: text, markup, annotated - select for diffs
Tue Sep 15 22:23:45 2009 UTC (2 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +0 -6 lines
SVN rev 197236 on 2009-09-15 22:23:45Z by andre -Put the optimized soreceive_stream() under a compile time option called TCP_SORECEIVE_STREAM for the time being. Requested by: brooks Once compiled in make it easily switchable for testers by using a tuneable net.inet.tcp.soreceive_stream and a corresponding read-only sysctl to report the current state. Suggested by: rwatson MFC after: 2 days -This line, and those below, will be ignored-- > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M sys/conf/options M sys/kern/uipc_socket.c M sys/netinet/tcp_subr.c M sys/netinet/tcp_usrreq.c
Revision 1.192.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.192: download - view: text, markup, annotated - select for diffs
Sat Aug 1 19:26:27 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +1 -1 lines
SVN rev 196019 on 2009-08-01 19:26:27Z by rwatson Merge the remainder of kern_vimage.c and vimage.h into vnet.c and vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes. Reviewed by: bz Approved by: re (vimage blanket)
Revision 1.191: download - view: text, markup, annotated - select for diffs
Tue Jul 14 22:48:30 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +0 -27 lines
SVN rev 195699 on 2009-07-14 22:48:30Z by rwatson Build on Jeff Roberson's linker-set based dynamic per-CPU allocator (DPCPU), as suggested by Peter Wemm, and implement a new per-virtual network stack memory allocator. Modify vnet to use the allocator instead of monolithic global container structures (vinet, ...). This change solves many binary compatibility problems associated with VIMAGE, and restores ELF symbols for virtualized global variables. Each virtualized global variable exists as a "reference copy", and also once per virtual network stack. Virtualized global variables are tagged at compile-time, placing the in a special linker set, which is loaded into a contiguous region of kernel memory. Virtualized global variables in the base kernel are linked as normal, but those in modules are copied and relocated to a reserved portion of the kernel's vnet region with the help of a the kernel linker. Virtualized global variables exist in per-vnet memory set up when the network stack instance is created, and are initialized statically from the reference copy. Run-time access occurs via an accessor macro, which converts from the current vnet and requested symbol to a per-vnet address. When "options VIMAGE" is not compiled into the kernel, normal global ELF symbols will be used instead and indirection is avoided. This change restores static initialization for network stack global variables, restores support for non-global symbols and types, eliminates the need for many subsystem constructors, eliminates large per-subsystem structures that caused many binary compatibility issues both for monitoring applications (netstat) and kernel modules, removes the per-function INIT_VNET_*() macros throughout the stack, eliminates the need for vnet_symmap ksym(2) munging, and eliminates duplicate definitions of virtualized globals under VIMAGE_GLOBALS. Bump __FreeBSD_version and update UPDATING. Portions submitted by: bz Reviewed by: bz, zec Discussed with: gnn, jamie, jeff, jhb, julian, sam Suggested by: peter Approved by: re (kensmith)
Revision 1.190: download - view: text, markup, annotated - select for diffs
Tue Jun 23 22:08:55 2009 UTC (2 years, 7 months ago) by bz
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +3 -3 lines
SVN rev 194777 on 2009-06-23 22:08:55Z by bz Make callers to in6_selectsrc() and in6_pcbladdr() pass in memory to save the selected source address rather than returning an unreferenced copy to a pointer that might long be gone by the time we use the pointer for anything meaningful. Asked for by: rwatson Reviewed by: rwatson
Revision 1.189: download - view: text, markup, annotated - select for diffs
Mon Jun 22 23:08:05 2009 UTC (2 years, 7 months ago) by andre
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +6 -0 lines
SVN rev 194672 on 2009-06-22 23:08:05Z by andre Add soreceive_stream(), an optimized version of soreceive() for stream (TCP) sockets. It is functionally identical to generic soreceive() but has a number stream specific optimizations: o does only one sockbuf unlock/lock per receive independent of the length of data to be moved into the uio compared to soreceive() which unlocks/locks per *mbuf*. o uses m_mbuftouio() instead of its own copy(out) variant. o much more compact code flow as a large number of special cases is removed. o much improved reability. It offers significantly reduced CPU usage and lock contention when receiving fast TCP streams. Additional gains are obtained when the receiving application is using SO_RCVLOWAT to batch up some data before a read (and wakeup) is done. This function was written by "reverse engineering" and is not just a stripped down variant of soreceive(). It is not yet enabled by default on TCP sockets. Instead it is commented out in the protocol initialization in tcp_usrreq.c until more widespread testing has been done. Testers, especially with 10GigE gear, are welcome. MFP4: r164817 //depot/user/andre/soreceive_stream/
Revision 1.188: download - view: text, markup, annotated - select for diffs
Tue Jun 16 18:58:50 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +4 -4 lines
SVN rev 194303 on 2009-06-16 18:58:50Z by jhb - Change members of tcpcb that cache values of ticks from int to u_int: t_rcvtime, t_starttime, t_rtttime, t_bw_rtttime, ts_recent_age, t_badrxtwin. - Change t_recent in struct timewait from u_long to u_int32_t to match the type of the field it shadows from tcpcb: ts_recent. - Change t_starttime in struct timewait from u_long to u_int to match the t_starttime field in tcpcb. Requested by: bde (1, 3)
Revision 1.187: download - view: text, markup, annotated - select for diffs
Thu Jun 11 14:37:18 2009 UTC (2 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -3 lines
SVN rev 194003 on 2009-06-11 14:37:18Z by jhb Correct printf format type mismatches.
Revision 1.186: download - view: text, markup, annotated - select for diffs
Wed Jun 10 18:27:15 2009 UTC (2 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +3 -3 lines
SVN rev 193941 on 2009-06-10 18:27:15Z by jhb Change a few members of tcpcb that store cached copies of ticks to be ints instead of unsigned longs. This fixes a few overflow edge cases on 64-bit platforms. Specifically, if an idle connection receives a packet shortly before 2^31 clock ticks of uptime (about 25 days with hz=1000) and the keep alive timer fires after 2^31 clock ticks, the keep alive timer will think that the connection has been idle for a very long time and will immediately drop the connection instead of sending a keep alive probe. Reviewed by: silby, gnn, lstewart MFC after: 1 week
Revision 1.163.2.16.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.163.2.16: preferred, colored; next MAIN 1.163.2.17: preferred, colored
Changes since revision 1.163.2.16: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.185: download - view: text, markup, annotated - select for diffs
Sat Apr 11 22:07:19 2009 UTC (2 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +2 -2 lines
SVN rev 190948 on 2009-04-11 22:07:19Z by rwatson Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and TCPSTAT_INC(), rather than directly manipulating the fields across the kernel. This will make it easier to change the implementation of these statistics, such as using per-CPU versions of the data structures. MFC after: 3 days
Revision 1.163.2.16: download - view: text, markup, annotated - select for diffs
Fri Apr 10 12:32:44 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.163.2.15: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.15: +1 -1 lines
SVN rev 190892 on 2009-04-10 12:32:44Z by bz MFC r190800: With the right comparison we get a proper wscale value and thus more adequate TCP performance with IPv6. Changes for IPv4, r166403 and r172795, both ignored the IPv6 counterpart and left it in the state of art of year 2000. The same logic in syncache already shares code between v4 and v6 so things do not need to be adapted there. Reported by: Steinar Haug (sthaug nethelp.no) Tested by: Steinar Haug (sthaug nethelp.no) Approved by: re (kib)
Revision 1.184: download - view: text, markup, annotated - select for diffs
Tue Apr 7 14:42:40 2009 UTC (2 years, 10 months ago) by bz
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +1 -1 lines
SVN rev 190800 on 2009-04-07 14:42:40Z by bz With the right comparison we get a proper wscale value and thus more adequate TCP performance with IPv6. Changes for IPv4, r166403 and r172795, both ignored the IPv6 counterpart and left it in the state of art of year 2000. The same logic in syncache already shares code between v4 and v6 so things do not need to be adapted there. Reported by: Steinar Haug (sthaug nethelp.no) Tested by: Steinar Haug (sthaug nethelp.no) MFC after: 3 days
Revision 1.163.2.15: download - view: text, markup, annotated - select for diffs
Thu Mar 26 22:54:19 2009 UTC (2 years, 10 months ago) by rwatson
Branches: RELENG_7
Diff to: previous 1.163.2.14: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.14: +29 -29 lines
SVN rev 190457 on 2009-03-26 22:54:19Z by rwatson
r189615:
Remove now-unused INP_UNMAPPABLEOPTS.
Discussd with: bz
r189637:
Avoid use of IPv6 macro aliases to inpcb fields and inp_flags; we don't
remove their defintions as some third-party tools may use them (such as
net-snmp), unlike in the 8.x change.
References to in6p_lport and in6_fport in sockstat are also replaced with
normal inp_lport and inp_fport references.
Reviewed by: bz
r189848:
Correct a number of evolved problems with inp_vflag and inp_flags:
certain flags that should have been in inp_flags ended up in inp_vflag,
meaning that they were inconsistently locked, and in one case,
interpreted. Move the following flags from inp_vflag to gaps in the
inp_flags space (and clean up the inp_flags constants to make gaps
more obvious to future takers):
INP_TIMEWAIT
INP_SOCKREF
INP_ONESBCAST
INP_DROPPED
Some aspects of this change have no effect on kernel ABI at all, as these
are UDP/TCP/IP-internal uses; however, netstat and sockstat detect
INP_TIMEWAIT when listing TCP sockets, so any MFC will need to take this
into account.
MFC after: 1 week (or after dependencies are MFC'd)
Reviewed by: bz
Note that this change requires netstat, systat, and sockstat to be
recompiled in order to properly print TIMEWAIT connection state; this
minor API change (documented in UPDATING) is considered worth it in
order to fix the above bugs. This change fixes the INP_ONESBCAST bug
describted in kern/124282 by disambiguating flag use.
Approved by: re (kib)
PR: kern/124282
r189637 discussed with: pav
Revision 1.163.2.14: download - view: text, markup, annotated - select for diffs
Sat Mar 21 12:53:42 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.13: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.13: +3 -3 lines
SVN rev 190199 on 2009-03-21 12:53:42Z by bz MFC r186141: Another step assimilating IPv[46] PCB code - directly use the inpcb names rather than the following IPv6 compat macros: in6pcb, in6p_sp, in6p_ip6_nxt, in6p_flowinfo, in6p_vflag, in6p_flags, in6p_socket, in6p_lport, in6p_fport, in6p_ppcb and sotoin6pcb(). Apart from removing duplicate code in netipsec, this is a pure whitespace, not a functional change.
Revision 1.163.2.13: download - view: text, markup, annotated - select for diffs
Sat Mar 21 12:02:11 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.12: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.12: +2 -5 lines
SVN rev 190198 on 2009-03-21 12:02:11Z by bz MFC r185371: Replace most INP_CHECK_SOCKAF() uses checking if it is an IPv6 socket by comparing a constant inp vflag. This is expected to help to reduce extra locking.
Revision 1.163.2.12: download - view: text, markup, annotated - select for diffs
Sat Mar 21 11:18:59 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.11: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.11: +5 -24 lines
SVN rev 190197 on 2009-03-21 11:18:59Z by bz MFC r185370: Merge in6_pcbfree() into in_pcbfree() which after the previous IPsec change in r185366 (r185366 for stable/7) only differed in two additonal IPv6 lines. Rather than splattering conditional code everywhere add the v6 check centrally at this single place.
Revision 1.163.2.11: download - view: text, markup, annotated - select for diffs
Fri Mar 20 21:22:14 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.10: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.10: +10 -32 lines
SVN rev 190177 on 2009-03-20 21:22:14Z by bz MFC r185344: Remove in6_pcbdetach() as it is exactly the same function as in_pcbdetach() and we don't need the code twice.
Revision 1.163.2.10: download - view: text, markup, annotated - select for diffs
Wed Mar 18 16:09:05 2009 UTC (2 years, 10 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.9: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.9: +1 -1 lines
SVN rev 189966 on 2009-03-18 16:09:05Z by bz MFC r186222: Use inc_flags instead of the inc_isipv6 alias which so far had been the only flag with random usage patterns. Switch inc_flags to be used as a real bit field by using INC_ISIPV6 with bitops to check for the 'isipv6' condition. While here fix a place or two where in case of v4 inc_flags were not properly initialized before.[1] Found by: rwatson during review [1]
Revision 1.163.2.9: download - view: text, markup, annotated - select for diffs
Tue Mar 17 10:15:49 2009 UTC (2 years, 10 months ago) by rwatson
Branches: RELENG_7
Diff to: previous 1.163.2.8: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.8: +3 -2 lines
SVN rev 189920 on 2009-03-17 10:15:49Z by rwatson Merge r188992 from head to stable/7: In tcp_usr_shutdown() and tcp_usr_send(), I missed converting NULL checks for the tcpcb, previously used to detect complete disconnection, with INP_DROPPED checks. Correct that, preventing shutdown() from improperly generating a TCP segment with destination IP and port of 0.0.0.0:0. PR: kern/132050 Reported by: david gueluy <david.gueluy at netasq.com>
Revision 1.183: download - view: text, markup, annotated - select for diffs
Sun Mar 15 09:58:31 2009 UTC (2 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +29 -29 lines
SVN rev 189848 on 2009-03-15 09:58:31Z by rwatson Correct a number of evolved problems with inp_vflag and inp_flags: certain flags that should have been in inp_flags ended up in inp_vflag, meaning that they were inconsistently locked, and in one case, interpreted. Move the following flags from inp_vflag to gaps in the inp_flags space (and clean up the inp_flags constants to make gaps more obvious to future takers): INP_TIMEWAIT INP_SOCKREF INP_ONESBCAST INP_DROPPED Some aspects of this change have no effect on kernel ABI at all, as these are UDP/TCP/IP-internal uses; however, netstat and sockstat detect INP_TIMEWAIT when listing TCP sockets, so any MFC will need to take this into account. MFC after: 1 week (or after dependencies are MFC'd) Reviewed by: bz
Revision 1.182: download - view: text, markup, annotated - select for diffs
Tue Feb 24 11:17:50 2009 UTC (2 years, 11 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +3 -2 lines
SVN rev 188992 on 2009-02-24 11:17:50Z by rwatson In tcp_usr_shutdown() and tcp_usr_send(), I missed converting NULL checks for the tcpcb, previously used to detect complete disconnection, with INP_DROPPED checks. Correct that, preventing shutdown() from improperly generating a TCP segment with destination IP and port of 0.0.0.0:0. PR: kern/132050 Reported by: david gueluy <david.gueluy at netasq.com> MFC after: 3 weeks
Revision 1.163.2.8: download - view: text, markup, annotated - select for diffs
Wed Feb 18 20:12:08 2009 UTC (2 years, 11 months ago) by jamie
Branches: RELENG_7
Diff to: previous 1.163.2.7: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.7: +5 -8 lines
SVN rev 188761 on 2009-02-18 20:12:08Z by jamie MFC: r188144: Standardize the various prison_foo_ip[46] functions and prison_if to return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. r188146: Don't allow creating a socket with a protocol family that the current jail doesn't support. This involves a new function prison_check_af, like prison_check_ip[46] but that checks only the family. With this change, most of the errors generated by jailed sockets shouldn't ever occur, at least until jails are changeable. r188148: Remove redundant calls of prison_local_ip4 in in_pcbbind_setup, and of prison_local_ip6 in in6_pcbbind. r188149: Call prison_if from rtm_get_jailed, instead of splitting it out into prison_check_ip4 and prison_check_ip6. As prison_if includes a jailed() check, remove that check before calling rtm_get_jailed. r188151: Don't bother null-checking the thread pointer before the prison checks in udp6_connect (td is already dereferenced elsewhere without such a check). This makes the conversion from a sockaddr to a sockaddr_in6 always happen, so convert once at the beginning of the function rather than twice in the middle. Approved by: bz (mentor)
Revision 1.163.2.7: download - view: text, markup, annotated - select for diffs
Sat Feb 7 13:19:08 2009 UTC (3 years ago) by bz
Branches: RELENG_7
Diff to: previous 1.163.2.6: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.6: +10 -2 lines
SVN rev 188281 on 2009-02-07 13:19:08Z by bz MFC: r185435: This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,.. SCTP support was updated and supports IPv6 in jails as well. Cpuset support permits jails to be bound to specific processor sets after creation. Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future. DDB 'show jails' command was added to aid debugging. Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities. Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years. Bump __FreeBSD_version for the afore mentioned and in kernel changes. r185441: Unbreak the no-networks (no INET/6) build. r185899: Correctly check the number of prison states to not access anything outside the prison_states array. When checking if there is a name configured for the prison, check the first character to not be '\0' instead of checking if the char array is present, which it always is. Note, that this is different for the *jailname in the syscall. Found with: Coverity Prevent(tm) CID: 4156, 4155 r186085: Make sure that the direct jls invocations prints something reasonable close to and in the same format as it had always. r186606: Make sure that unused j->ip[46] are cleared. r186834: Document the special loopback address behaviour of jails. PR: kern/103464 r186841: Put the devfs ruleset next to devfs enable, add a comment about the suggested ruleset[1]. While here use an IP from the 'test-net' prefix for docs. PR: kern/130102 r187059: Add a short section talking about jails and file systems; mention the mountand jail-aware file systems as well as quota. PR: kern/68192 r187092: Sort .Xr. r187365: s,unmount 8,umount 8, it is unmount(2) which I did not mean. r187669: Update the description of the '-h' option wrt to primary addresses per address family and add a reference to the ip-addresses option. r187670: New sentence starts on a new line.
Revision 1.181: download - view: text, markup, annotated - select for diffs
Thu Feb 5 14:06:09 2009 UTC (3 years ago) by jamie
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +5 -8 lines
SVN rev 188144 on 2009-02-05 14:06:09Z by jamie Standardize the various prison_foo_ip[46] functions and prison_if to return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. Approved by: bz (mentor)
Revision 1.180: download - view: text, markup, annotated - select for diffs
Wed Dec 17 12:52:34 2008 UTC (3 years, 1 month ago) by bz
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +1 -1 lines
SVN rev 186222 on 2008-12-17 12:52:34Z by bz Use inc_flags instead of the inc_isipv6 alias which so far had been the only flag with random usage patterns. Switch inc_flags to be used as a real bit field by using INC_ISIPV6 with bitops to check for the 'isipv6' condition. While here fix a place or two where in case of v4 inc_flags were not properly initialized before.[1] Found by: rwatson during review [1] Discussed with: rwatson Reviewed by: rwatson MFC after: 4 weeks
Revision 1.179: download - view: text, markup, annotated - select for diffs
Mon Dec 15 21:50:54 2008 UTC (3 years, 1 month ago) by bz
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +3 -3 lines
SVN rev 186141 on 2008-12-15 21:50:54Z by bz Another step assimilating IPv[46] PCB code - directly use the inpcb names rather than the following IPv6 compat macros: in6pcb,in6p_sp, in6p_ip6_nxt,in6p_flowinfo,in6p_vflag, in6p_flags,in6p_socket,in6p_lport,in6p_fport,in6p_ppcb and sotoin6pcb(). Apart from removing duplicate code in netipsec, this is a pure whitespace, not a functional change. Discussed with: rwatson Reviewed by: rwatson (version before review requested changes) MFC after: 4 weeks (set the timer and see then)
Revision 1.178: download - view: text, markup, annotated - select for diffs
Tue Dec 2 21:37:28 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +1 -0 lines
SVN rev 185571 on 2008-12-02 21:37:28Z by bz Rather than using hidden includes (with cicular dependencies), directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files. For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h. Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation
Revision 1.177: download - view: text, markup, annotated - select for diffs
Sat Nov 29 14:32:14 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +10 -2 lines
SVN rev 185435 on 2008-11-29 14:32:14Z by bz MFp4: Bring in updated jail support from bz_jail branch. This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,.. SCTP support was updated and supports IPv6 in jails as well. Cpuset support permits jails to be bound to specific processor sets after creation. Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future. DDB 'show jails' command was added to aid debugging. Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities. Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years. Bump __FreeBSD_version for the afore mentioned and in kernel changes. Special thanks to: - Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches and Olivier Houchard (cognet) for initial single-IPv6 patches. - Jeff Roberson (jeff) and Randall Stewart (rrs) for their help, ideas and review on cpuset and SCTP support. - Robert Watson (rwatson) for lots and lots of help, discussions, suggestions and review of most of the patch at various stages. - John Baldwin (jhb) for his help. - Simon L. Nielsen (simon) as early adopter testing changes on cluster machines as well as all the testers and people who provided feedback the last months on freebsd-jail and other channels. - My employer, CK Software GmbH, for the support so I could work on this. Reviewed by: (see above) MFC after: 3 months (this is just so that I get the mail) X-MFC Before: 7.2-RELEASE if possible
Revision 1.176: download - view: text, markup, annotated - select for diffs
Thu Nov 27 13:19:42 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +2 -5 lines
SVN rev 185371 on 2008-11-27 13:19:42Z by bz Replace most INP_CHECK_SOCKAF() uses checking if it is an IPv6 socket by comparing a constant inp vflag. This is expected to help to reduce extra locking. Suggested by: rwatson Reviewed by: rwatson MFC after: 6 weeks
Revision 1.175: download - view: text, markup, annotated - select for diffs
Thu Nov 27 12:04:35 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +5 -24 lines
SVN rev 185370 on 2008-11-27 12:04:35Z by bz Merge in6_pcbfree() into in_pcbfree() which after the previous IPsec change in r185366 only differed in two additonal IPv6 lines. Rather than splattering conditional code everywhere add the v6 check centrally at this single place. Reviewed by: rwatson (as part of a larger changset) MFC after: 6 weeks (*) (*) possibly need to leave a stub wrapper in 7 to keep the symbol.
Revision 1.174: download - view: text, markup, annotated - select for diffs
Wed Nov 26 20:52:26 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +10 -32 lines
SVN rev 185344 on 2008-11-26 20:52:26Z by bz Remove in6_pcbdetach() as it is exactly the same function as in_pcbdetach() and we don't need the code twice. Reviewed by: rwatson MFC after: 6 weeks (*) (*) possibly need to leave a stub wrapper in 7 to keep the symbol.
Revision 1.163.2.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.163.2.6: preferred, colored; next MAIN 1.163.2.7: preferred, colored
Changes since revision 1.163.2.6: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.173: download - view: text, markup, annotated - select for diffs
Thu Oct 2 15:37:58 2008 UTC (3 years, 4 months ago) by zec
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +26 -0 lines
SVN rev 183550 on 2008-10-02 15:37:58Z by zec Step 1.5 of importing the network stack virtualization infrastructure from the vimage project, as per plan established at devsummit 08/08: http://wiki.freebsd.org/Image/Notes200808DevSummit Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator macros, and CURVNET_SET() context setting macros, all currently resolving to NOPs. Prepare for virtualization of selected SYSCTL objects by introducing a family of SYSCTL_V_*() macros, currently resolving to their global counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT(). Move selected #defines from sys/sys/vimage.h to newly introduced header files specific to virtualized subsystems (sys/net/vnet.h, sys/netinet/vinet.h etc.). All the changes are verified to have zero functional impact at this point in time by doing MD5 comparision between pre- and post-change object files(*). (*) netipsec/keysock.c did not validate depending on compile time options. Implemented by: julian, bz, brooks, zec Reviewed by: julian, bz, brooks, kris, rwatson, ... Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation
Revision 1.124.2.7.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.124.2.7: preferred, colored; next MAIN 1.125: preferred, colored
Changes since revision 1.124.2.7: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.163.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 18 08:11:48 2008 UTC (3 years, 5 months ago) by rwatson
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.163.2.5: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.5: +68 -68 lines
SVN rev 181822 on 2008-08-18 08:11:48Z by rwatson Merge r178285, r178318, r178319, r178320, r178321, r178322, r178325, r178376, r178377, r178378, r178419, r179412, r179414, r180127, r180338, r180343, r180344, r180346, r180348, r180368, r180422, r180429, r180536, r180558, r180589, r181364, r181365 from head to stable/7: Introduce and use rwlocks throughout the inpcbinfo and inpcb infrastructure, and protocols that depend on that infrastructure, including UDP, TCP, and IP raw sockets. Significant parts of this work were reviewed by Bjoern Zeeb, and tested by Paul Saab, Kris Keneway, and George Neville-Neil, whose contributions to this work are greatly appreciated. Tested by: ps, kris, gnn, Mike Tancsa <mike at sentex dot net> Reviewed by: bz, des
Revision 1.172: download - view: text, markup, annotated - select for diffs
Sun Aug 17 23:27:27 2008 UTC (3 years, 5 months ago) by bz
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +46 -45 lines
SVN rev 181803 on 2008-08-17 23:27:27Z by bz Commit step 1 of the vimage project, (network stack) virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
Revision 1.171: download - view: text, markup, annotated - select for diffs
Thu Jul 31 15:10:09 2008 UTC (3 years, 6 months ago) by rpaulo
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +4 -0 lines
SVN rev 181056 on 2008-07-31 15:10:09Z by rpaulo MFp4 (//depot/projects/tcpecn/): TCP ECN support. Merge of my GSoC 2006 work for NetBSD. TCP ECN is defined in RFC 3168. Partly reviewed by: dwmalone, silby Obtained from: NetBSD
Revision 1.163.2.5: download - view: text, markup, annotated - select for diffs
Thu Jul 31 06:10:25 2008 UTC (3 years, 6 months ago) by kmacy
Branches: RELENG_7
Diff to: previous 1.163.2.4: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.4: +6 -0 lines
SVN rev 181048 on 2008-07-31 06:10:25Z by kmacy MFC: - Add socket option for setting and retrieving the congestion control algorithm. The name used is to allow compatibility with Linux. - add rcv_nxt, snd_nxt, and toe offload id to FreeBSD-specific extension fields for tcp_info
Revision 1.163.2.4: download - view: text, markup, annotated - select for diffs
Wed Jul 30 20:35:41 2008 UTC (3 years, 6 months ago) by kmacy
Branches: RELENG_7
Diff to: previous 1.163.2.3: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.3: +13 -9 lines
SVN rev 181013 on 2008-07-30 20:35:41Z by kmacy MFC TCP hooks for conditionally tying TCP offload devices in to the TCP stack.
Revision 1.170: download - view: text, markup, annotated - select for diffs
Mon May 5 23:13:27 2008 UTC (3 years, 9 months ago) by kmacy
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +5 -5 lines
replace spaces added in last change with tabs
Revision 1.169: download - view: text, markup, annotated - select for diffs
Mon May 5 20:13:31 2008 UTC (3 years, 9 months ago) by kmacy
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +6 -0 lines
add rcv_nxt, snd_nxt, and toe offload id to FreeBSD-specific extension fields for tcp_info
Revision 1.168: download - view: text, markup, annotated - select for diffs
Thu Apr 17 21:38:16 2008 UTC (3 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +68 -68 lines
Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to explicitly select write locking for all use of the inpcb mutex. Update some pcbinfo lock assertions to assert locked rather than write-locked, although in practice almost all uses of the pcbinfo rwlock main exclusive, and all instances of inpcb lock acquisition are exclusive. This change should introduce (ideally) little functional change. However, it lays the groundwork for significantly increased parallelism in the TCP/IP code. MFC after: 3 months Tested by: kris (superset of committered patch)
Revision 1.163.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 1 11:50:00 2008 UTC (3 years, 11 months ago) by rwatson
Branches: RELENG_7
Diff to: previous 1.163.2.2: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.2: +55 -25 lines
Merge tcp_usrreq.c:1.166 from HEAD to RELENG_7: In tcp_ctloutput(), don't hold the inpcb lock over sooptcopyin(), rather, drop the lock and then re-acquire it, revalidating TCP connection state assumptions when we do so. This avoids a potential lock order reversal (and potential deadlock, although none have been reported) due to the inpcb lock being held over a page fault. PR: 102752 Reviewed by: bz Reported by: Václav Haisman <v dot haisman at sh dot cvut dot cz>
Revision 1.163.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 26 13:57:33 2008 UTC (4 years ago) by rwatson
Branches: RELENG_7_0
CVS tags: RELENG_7_0_0_RELEASE
Diff to: previous 1.163.2.1: preferred, colored; next MAIN 1.163.2.2: preferred, colored
Changes since revision 1.163.2.1: +2 -0 lines
Merge tcp_usrreq.c:1.167 from HEAD to RELENG_7_0: tcp_usrreq.c:1.130 removed tcbinfo locking from tcp_usr_accept(), which while in principle a good idea, opened us up to a race inherrent to the syncache's direct insertion of incoming TCP connections into the "completed connection" listen queue, as it transpires that the socket is inserted before the inpcb is fully filled in by syncache_expand(). The bug manifested with the occasional returning of 0.0.0.0:0 in the address returned by the accept() system call, which occurred if accept managed to execute tcp_usr_accept() before syncache_expand() had copied the endpoint addresses into inpcb connection state. Re-add tcbinfo locking around the address copyout, which has the effect of delaying the copy until syncache_expand() has finished running, as it is run while the tcbinfo lock is held. This is undesirable in that it increases contention on tcbinfo further, but a more significant change will be required to how the syncache inserts new sockets in order to fix this and keep more granular locking here. In particular, either more state needs to be passed into sonewconn() so that pru_attach() can fill in the fields *before* the socket is inserted, or the socket needs to be inserted in the incomplete connection queue until it is actually ready to be used. Reported by: glebius (and kris) Tested by: glebius Approved by: re (kensmith)
Revision 1.124.2.7: download - view: text, markup, annotated - select for diffs
Thu Jan 24 21:37:18 2008 UTC (4 years ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.124.2.6: preferred, colored; branchpoint 1.124: preferred, colored; next MAIN 1.125: preferred, colored
Changes since revision 1.124.2.6: +4 -0 lines
MFC: Expose smoothed RTT and RTT variance measurements to userland via socket option TCP_INFO.
Revision 1.163.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 23:40:22 2008 UTC (4 years ago) by rwatson
Branches: RELENG_7
Diff to: previous 1.163.2.1: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.1: +2 -0 lines
Merge tcp_usrreq.c:1.167 from HEAD to RELENG_7: tcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which while in principle a good idea, opened us up to a race inherrent to the syncache's direct insertion of incoming TCP connections into the "completed connection" listen queue, as it transpires that the socket is inserted before the inpcb is fully filled in by syncache_expand(). The bug manifested with the occasional returning of 0.0.0.0:0 in the address returned by the accept() system call, which occurred if accept managed to execute tcp_usr_accept() before syncache_expand() had copied the endpoint addresses into inpcb connection state. Re-add tcbinfo locking around the address copyout, which has the effect of delaying the copy until syncache_expand() has finished running, as it is run while the tcbinfo lock is held. This is undesirable in that it increases contention on tcbinfo further, but a more significant change will be required to how the syncache inserts new sockets in order to fix this and keep more granular locking here. In particular, either more state needs to be passed into sonewconn() so that pru_attach() can fill in the fields *before* the socket is inserted, or the socket needs to be inserted in the incomplete connection queue until it is actually ready to be used. Reported by: glebius (and kris) Tested by: glebius Approved: re (kensmith)
Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Jan 23 21:15:51 2008 UTC (4 years ago) by rwatson
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +2 -0 lines
tcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which while in principle a good idea, opened us up to a race inherrent to the syncache's direct insertion of incoming TCP connections into the "completed connection" listen queue, as it transpires that the socket is inserted before the inpcb is fully filled in by syncache_expand(). The bug manifested with the occasional returning of 0.0.0.0:0 in the address returned by the accept() system call, which occurred if accept managed to execute tcp_usr_accept() before syncache_expand() had copied the endpoint addresses into inpcb connection state. Re-add tcbinfo locking around the address copyout, which has the effect of delaying the copy until syncache_expand() has finished running, as it is run while the tcbinfo lock is held. This is undesirable in that it increases contention on tcbinfo further, but a more significant change will be required to how the syncache inserts new sockets in order to fix this and keep more granular locking here. In particular, either more state needs to be passed into sonewconn() so that pru_attach() can fill in the fields *before* the socket is inserted, or the socket needs to be inserted in the incomplete connection queue until it is actually ready to be used. Reported by: glebius (and kris) Tested by: glebius
Revision 1.166: download - view: text, markup, annotated - select for diffs
Fri Jan 18 12:19:50 2008 UTC (4 years ago) by rwatson
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +55 -25 lines
In tcp_ctloutput(), don't hold the inpcb lock over sooptcopyin(), rather, drop the lock and then re-acquire it, revalidating TCP connection state assumptions when we do so. This avoids a potential lock order reversal (and potential deadlock, although none have been reported) due to the inpcb lock being held over a page fault. MFC after: 1 week PR: 102752 Reviewed by: bz Reported by: Václav Haisman <v dot haisman at sh dot cvut dot cz>
Revision 1.165: download - view: text, markup, annotated - select for diffs
Tue Dec 18 22:59:07 2007 UTC (4 years, 1 month ago) by kmacy
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +13 -9 lines
Incorporate TCP offload hooks in to core TCP code.
- Rename output routines tcp_gen_* -> tcp_output_*.
- Rename notification routines that turn in to no-ops in the absence of TOE
from tcp_gen_* -> tcp_offload_*.
- Fix some minor comment nits.
- Add a /* FALLTHROUGH */
Reviewed by: Sam Leffler, Robert Watson, and Mike Silbersack
Revision 1.163.2.1: download - view: text, markup, annotated - select for diffs
Fri Oct 26 05:41:25 2007 UTC (4 years, 3 months ago) by silby
Branches: RELENG_7
CVS tags: RELENG_7_0_BP
Branch point for: RELENG_7_0
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +1 -2 lines
MFC: tcp_syncache.c rev 1.131 tcp_usrreq.c rev 1.164 Pick the smallest possible TCP window scaling factor that will still allow us to scale up to sb_max, aka kern.ipc.maxsockbuf. Approved by: re (kensmith)
Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Oct 19 08:53:14 2007 UTC (4 years, 3 months ago) by silby
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +1 -2 lines
Pick the smallest possible TCP window scaling factor that will still allow us to scale up to sb_max, aka kern.ipc.maxsockbuf. We do this because there are broken firewalls that will corrupt the window scale option, leading to the other endpoint believing that our advertised window is unscaled. At scale factors larger than 5 the unscaled window will drop below 1500 bytes, leading to serious problems when traversing these broken firewalls. With the default maxsockbuf of 256K, a scale factor of 3 will be chosen by this algorithm. Those who choose a larger maxsockbuf should watch out for the compatiblity problems mentioned above. Reviewed by: andre
Revision 1.163: download - view: text, markup, annotated - select for diffs
Sun Oct 7 20:44:24 2007 UTC (4 years, 4 months ago) by silby
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -1 lines
Add FBSDID to all files in netinet so that people can more easily include file version information in bug reports. Approved by: re (kensmith)
Revision 1.162: download - view: text, markup, annotated - select for diffs
Mon Sep 24 05:26:24 2007 UTC (4 years, 4 months ago) by silby
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +3 -3 lines
Two changes: - Reintegrate the ANSI C function declaration change from tcp_timer.c rev 1.92 - Reorganize the tcpcb structure so that it has a single pointer to the "tcp_timer" structure which contains all of the tcp timer callouts. This change means that when the single tcp timer change is reintegrated, tcpcb will not change in size, and therefore the ABI between netstat and the kernel will not change. Neither of these changes should have any functional impact. Reviewed by: bmah, rrs Approved by: re (bmah)
Revision 1.161: download - view: text, markup, annotated - select for diffs
Fri Sep 7 09:19:22 2007 UTC (4 years, 5 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +4 -7 lines
Back out tcp_timer.c:1.93 and associated changes that reimplemented the many TCP timers as a single timer, but retain the API changes necessary to reintroduce this change. This will back out the source of at least two reported problems: lock leaks in certain timer edge cases, and TCP timers continuing to fire after a connection has closed (a bug previously fixed and then reintroduced with the timer rewrite). In a follow-up commit, some minor restylings and comment changes performed after the TCP timer rewrite will be reapplied, and a further change to allow the TCP timer rewrite to be added back without disturbing the ABI. The new design is believed to be a good thing, but the outstanding issues are leading to significant stability/correctness problems that are holding up 7.0. This patch was generated by silby, but is being committed by proxy due to poor network connectivity for silby this week. Approved by: re (kensmith) Submitted by: silby Tested by: rwatson, kris Problems reported by: peter, kris, others
Revision 1.160: download - view: text, markup, annotated - select for diffs
Mon Jul 30 11:06:41 2007 UTC (4 years, 6 months ago) by des
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +0 -4 lines
Make tcpstates[] static, and make sure TCPSTATES is defined before <netinet/tcp_fsm.h> is included into any compilation unit that needs tcpstates[]. Also remove incorrect extern declarations and TCPDEBUG conditionals. This allows kernels both with and without TCPDEBUG to build, and unbreaks the tinderbox. Approved by: re (rwatson)
Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun Jul 29 01:31:33 2007 UTC (4 years, 6 months ago) by mjacob
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -1 lines
Fix compilation problems- tcpstates is only available if TCPDEBUG is set. Approved by: re (in spirit)
Revision 1.158: download - view: text, markup, annotated - select for diffs
Fri Jun 15 22:54:11 2007 UTC (4 years, 7 months ago) by mjacob
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +0 -6 lines
Garbage collect some debug code that not only no longer could work but in fact probably causes a random pointer dereferences. Garbage collect the tp variable too.
Revision 1.157: download - view: text, markup, annotated - select for diffs
Thu May 31 12:06:02 2007 UTC (4 years, 8 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +3 -4 lines
(1) In tcp_usrclosed(), tp can never become NULL, so don't test for NULL
before handling the socket disconnection case.
(2) Clean up surrounding comments and formatting.
Found with: Coverity Prevent(tm) (1)
CID: 2203
Revision 1.156: download - view: text, markup, annotated - select for diffs
Fri May 11 10:20:50 2007 UTC (4 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +3 -3 lines
Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr protocol entry points using functions named proto_getsockaddr and proto_getpeeraddr rather than proto_setsockaddr and proto_setpeeraddr. While it's true that sockaddrs are allocated and set, the net effect is to retrieve (get) the socket address or peer address from a socket, not set it, so align names to that intent.
Revision 1.155: download - view: text, markup, annotated - select for diffs
Fri May 11 09:54:53 2007 UTC (4 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +2 -25 lines
Remove unneeded wrappers for in_setsockaddr() and in_setpeeraddr(), which used to exist so pcbinfo locks could be acquired, but are no longer required as a result of socket/pcb reference model refinements.
Revision 1.154: download - view: text, markup, annotated - select for diffs
Thu May 10 15:58:48 2007 UTC (4 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +2 -0 lines
Move universally to ANSI C function declarations, with relatively consistent style(9)-ish layout.
Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun May 6 16:04:36 2007 UTC (4 years, 9 months ago) by andre
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +2 -2 lines
Remove unused requested_s_scale from struct tcpcb.
Revision 1.152: download - view: text, markup, annotated - select for diffs
Sun May 6 15:56:31 2007 UTC (4 years, 9 months ago) by andre
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -3 lines
Use existing TF_SACK_PERMIT flag in struct tcpcb t_flags field instead of a decdicated sack_enable int for this bool. Change all users accordingly.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue May 1 16:31:02 2007 UTC (4 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +2 -2 lines
Remove unused pcbinfo arguments to in_setsockaddr() and in_setpeeraddr().
Revision 1.150: download - view: text, markup, annotated - select for diffs
Wed Apr 11 09:45:16 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +10 -8 lines
Change the TCP timer system from using the callout system five times directly to a merged model where only one callout, the next to fire, is registered. Instead of callout_reset(9) and callout_stop(9) the new function tcp_timer_activate() is used which then internally manages the callout. The single new callout is a mutex callout on inpcb simplifying the locking a bit. tcp_timer() is the called function which handles all race conditions in one place and then dispatches the individual timer functions. Reviewed by: rwatson (earlier version)
Revision 1.149: download - view: text, markup, annotated - select for diffs
Wed Mar 21 19:37:55 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +9 -22 lines
ANSIfy function declarations and remove register keywords for variables. Consistently apply style to all function declarations.
Revision 1.148: download - view: text, markup, annotated - select for diffs
Wed Mar 21 18:05:54 2007 UTC (4 years, 10 months ago) by andre
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +0 -5 lines
Remove tcp_minmssoverload DoS detection logic. The problem it tried to protect us from wasn't really there and it only bloats the code. Should the problem surface in the future we can simply resurrect it from cvs history.
Revision 1.147: download - view: text, markup, annotated - select for diffs
Mon Feb 26 22:25:20 2007 UTC (4 years, 11 months ago) by mohans
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +7 -2 lines
Reap FIN_WAIT_2 connections marked SOCANTRCVMORE faster. This mitigate potential issues where the peer does not close, potentially leaving thousands of connections in FIN_WAIT_2. This is controlled by a new sysctl fast_finwait2_recycle, which is disabled by default. Reviewed by: gnn, silby.
Revision 1.146: download - view: text, markup, annotated - select for diffs
Sat Feb 17 21:02:38 2007 UTC (4 years, 11 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +321 -1 lines
Add "show inpcb", "show tcpcb" DDB commands, which should come in handy for debugging sblock and other network panics.
Revision 1.145: download - view: text, markup, annotated - select for diffs
Fri Feb 2 18:34:18 2007 UTC (5 years ago) by bms
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +4 -0 lines
Expose smoothed RTT and RTT variance measurements to userland via socket option TCP_INFO. Note that the units used in the original Linux API are in microseconds, so use a 64-bit mantissa to convert FreeBSD's internal measurements from struct tcpcb from ticks.
Revision 1.144: download - view: text, markup, annotated - select for diffs
Thu Feb 1 18:32:13 2007 UTC (5 years ago) by andre
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +2 -0 lines
Auto sizing TCP socket buffers. Normally the socket buffers are static (either derived from global defaults or set with setsockopt) and do not adapt to real network conditions. Two things happen: a) your socket buffers are too small and you can't reach the full potential of the network between both hosts; b) your socket buffers are too big and you waste a lot of kernel memory for data just sitting around. With automatic TCP send and receive socket buffers we can start with a small buffer and quickly grow it in parallel with the TCP congestion window to match real network conditions. FreeBSD has a default 32K send socket buffer. This supports a maximal transfer rate of only slightly more than 2Mbit/s on a 100ms RTT trans-continental link. Or at 200ms just above 1Mbit/s. With TCP send buffer auto scaling and the default values below it supports 20Mbit/s at 100ms and 10Mbit/s at 200ms. That's an improvement of factor 10, or 1000%. For the receive side it looks slightly better with a default of 64K buffer size. New sysctls are: net.inet.tcp.sendbuf_auto=1 (enabled) net.inet.tcp.sendbuf_inc=8192 (8K, step size) net.inet.tcp.sendbuf_max=262144 (256K, growth limit) net.inet.tcp.recvbuf_auto=1 (enabled) net.inet.tcp.recvbuf_inc=16384 (16K, step size) net.inet.tcp.recvbuf_max=262144 (256K, growth limit) Tested by: many (on HEAD and RELENG_6) Approved by: re MFC after: 1 month
Revision 1.143: download - view: text, markup, annotated - select for diffs
Thu Feb 1 17:39:18 2007 UTC (5 years ago) by andre
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +7 -2 lines
Change the way the advertized TCP window scaling is computed. Instead of upper-bounding it to the size of the initial socket buffer lower-bound it to the smallest MSS we accept. Ideally we'd use the actual MSS information here but it is not available yet. For socket buffer auto sizing to be effective we need room to grow the receive window. The window scale shift is determined at connection setup and can't be changed afterwards. The previous, original, method effectively just did a power of two roundup of the socket buffer size at connection setup severely limiting the headroom for larger socket buffers. Tested by: many (as part of the socket buffer auto sizing patch) MFC after: 1 month
Revision 1.124.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 8 18:10:12 2007 UTC (5 years, 1 month ago) by sam
Branches: RELENG_6
CVS tags: RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Diff to: previous 1.124.2.5: preferred, colored; branchpoint 1.124: preferred, colored
Changes since revision 1.124.2.5: +15 -15 lines
MFC 1.142: change error codes returned by protocol operations when an incpb is dropped [revised for RELENG_6 code base] Reviewed by: rwatson, Eric Huss
Revision 1.124.2.5: download - view: text, markup, annotated - select for diffs
Fri Dec 29 19:25:49 2006 UTC (5 years, 1 month ago) by jhb
Branches: RELENG_6
Diff to: previous 1.124.2.4: preferred, colored; branchpoint 1.124: preferred, colored
Changes since revision 1.124.2.4: +2 -2 lines
MFC: Close some races between enumerating inpcb's and tearing them down by making the mutex portion of struct inpcb type-stable and never destroying it.
Revision 1.124.2.3.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 28 23:19:18 2006 UTC (5 years, 2 months ago) by rwatson
Branches: RELENG_6_2
CVS tags: RELENG_6_2_0_RELEASE
Diff to: previous 1.124.2.3: preferred, colored; next MAIN 1.124.2.4: preferred, colored
Changes since revision 1.124.2.3: +1 -1 lines
Merge ip_output.c:1.242.2.17, ip_var.h:1.95.2.1, tcp_usrreq.c:1.124.2.4 from RELENG_6 to RELENG_6_2: Reformulate ip_ctloutput() and tcp_ctloutput() to work around the fact that so_pcb can be invalidated at any time due to an untimely reset. Move the body of ip_ctloutput() to ip_ctloutput_pcbinfo(), which accepts a pcbinfo argument, and wrap it with ip_ctloutput(), which passes a NULL. Modify tcp_ctloutput() to directly invoke ip_ctloutput_pcbinfo() and pass tcbinfo. Hold the pcbinfo lock when dereferencing so_pcb and acquiring the inpcb lock in order to prevent the inpcb from being freed; the pcbinfo lock is then immediately dropped. This is required as TCP may free the inppcb and invalidate so_pcb due to a reset at any time in the RELENG_6 network stack, which otherwise leads to a panic. This panic might be frequently seen on highly loaded IRC and Samba servers, which have long-lasting TCP connections, query socket options frequently, and see a significant number of reset connections. This change has been merged directly to RELENG_6 as the problem does not exist in HEAD, where the invariants for so_pcb are much stronger; the architectural changes in HEAD avoid the need to acquire a global lock in the socket option path. This change will be merged to RELENG_6_2. PR: 102412, 104765 Reviewed by: Diane Bruce <db at db.net> Tested by: Daniel Austin <daniel at kewlio dot net>, Kai Gallasch <gallasch at free dot de> Approved by: re (kensmith)
Revision 1.124.2.4: download - view: text, markup, annotated - select for diffs
Tue Nov 28 21:41:12 2006 UTC (5 years, 2 months ago) by rwatson
Branches: RELENG_6
Diff to: previous 1.124.2.3: preferred, colored; branchpoint 1.124: preferred, colored
Changes since revision 1.124.2.3: +1 -1 lines
Reformulate ip_ctloutput() and tcp_ctloutput() to work around the fact that so_pcb can be invalidated at any time due to an untimely reset. Move the body of ip_ctloutput() to ip_ctloutput_pcbinfo(), which accepts a pcbinfo argument, and wrap it with ip_ctloutput(), which passes a NULL. Modify tcp_ctloutput() to directly invoke ip_ctloutput_pcbinfo() and pass tcbinfo. Hold the pcbinfo lock when dereferencing so_pcb and acquiring the inpcb lock in order to prevent the inpcb from being freed; the pcbinfo lock is then immediately dropped. This is required as TCP may free the inppcb and invalidate so_pcb due to a reset at any time in the RELENG_6 network stack, which otherwise leads to a panic. This panic might be frequently seen on highly loaded IRC and Samba servers, which have long-lasting TCP connections, query socket options frequently, and see a significant number of reset connections. This change has been merged directly to RELENG_6 as the problem does not exist in HEAD, where the invariants for so_pcb are much stronger; the architectural changes in HEAD avoid the need to acquire a global lock in the socket option path. This change will be merged to RELENG_6_2. PR: 102412, 104765 Reviewed by: Diane Bruce <db at db.net> Tested by: Daniel Austin <daniel at kewlio dot net>, Kai Gallasch <gallasch at free dot de>
Revision 1.142: download - view: text, markup, annotated - select for diffs
Wed Nov 22 17:16:54 2006 UTC (5 years, 2 months ago) by sam
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +6 -6 lines
Change error codes returned by protocol operations when an inpcb is
marked INP_DROPPED or INP_TIMEWAIT:
o return ECONNRESET instead of EINVAL for close, disconnect, shutdown,
rcvd, rcvoob, and send operations
o return ECONNABORTED instead of EINVAL for accept
These changes should reduce confusion in applications since EINVAL is
normally interpreted to mean an invalid file descriptor. This change
does not conflict with POSIX or other standards I checked. The return
of EINVAL has always been possible but rare; it's become more common
with recent changes to the socket/inpcb handling and with finer-grained
locking and preemption.
Note: there are other instances of EINVAL for this state that were
left unchanged; they should be reviewed.
Reviewed by: rwatson, andre, ru
MFC after: 1 month
Revision 1.124.2.3: download - view: text, markup, annotated - select for diffs
Wed Sep 27 09:24:44 2006 UTC (5 years, 4 months ago) by mux
Branches: RELENG_6
CVS tags: RELENG_6_2_BP
Branch point for: RELENG_6_2
Diff to: previous 1.124.2.2: preferred, colored; branchpoint 1.124: preferred, colored
Changes since revision 1.124.2.2: +2 -2 lines
MFC udp_usrreq.c:1.180 and tcp_usrreq.c:1.128 : Fix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to match the type of the variable they are exporting. Spotted by: Thomas Hurst <tom@hur.st> Approved by: re@ (rwatson) Forgotten by: mux
Revision 1.141: download - view: text, markup, annotated - select for diffs
Sun Sep 17 13:39:35 2006 UTC (5 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +4 -0 lines
Make tcp_usr_send() free the passed mbufs on error in all cases as the comment to it claims. Sponsored by: TCP/IP Optimization Fundraise 2005
Revision 1.140: download - view: text, markup, annotated - select for diffs
Fri Jul 21 17:11:14 2006 UTC (5 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +92 -55 lines
Change semantics of socket close and detach. Add a new protocol switch function, pru_close, to notify protocols that the file descriptor or other consumer of a socket is closing the socket. pru_abort is now a notification of close also, and no longer detaches. pru_detach is no longer used to notify of close, and will be called during socket tear-down by sofree() when all references to a socket evaporate after an earlier call to abort or close the socket. This means detach is now an unconditional teardown of a socket, whereas previously sockets could persist after detach of the protocol retained a reference. This faciliates sharing mutexes between layers of the network stack as the mutex is required during the checking and removal of references at the head of sofree(). With this change, pru_detach can now assume that the mutex will no longer be required by the socket layer after completion, whereas before this was not necessarily true. Reviewed by: gnn
Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue Jul 18 22:34:27 2006 UTC (5 years, 6 months ago) by ups
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +1 -2 lines
Fix race conditions on enumerating pcb lists by moving the initialization ( and where appropriate the destruction) of the pcb mutex to the init/finit functions of the pcb zones. This allows locking of the pcb entries and race condition free comparison of the generation count. Rearrange locking a bit to avoid extra locking operation to update the generation count in in_pcballoc(). (in_pcballoc now returns the pcb locked) I am planning to convert pcb list handling from a type safe to a reference count model soon. ( As this allows really freeing the PCBs) Reviewed by: rwatson@, mohans@ MFC after: 1 week
Revision 1.138: download - view: text, markup, annotated - select for diffs
Mon Jun 26 09:38:08 2006 UTC (5 years, 7 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +2 -4 lines
In tcp6_usr_attach(), return immediately if SS_ISDISCONNECTED, to avoid dereferencing an uninitialized inp variable. Submitted by: Michiel Boland <michiel at boland dot org> MFC after: 1 month
Revision 1.137: download - view: text, markup, annotated - select for diffs
Sun Jun 4 09:31:34 2006 UTC (5 years, 8 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +8 -6 lines
Push acquisition of pcbinfo lock out of tcp_usr_attach() into tcp_attach() after the call to soreserve(), as it doesn't require the global lock. Rearrange inpcb locking here also. MFC after: 1 month
Revision 1.136: download - view: text, markup, annotated - select for diffs
Mon Apr 24 08:20:02 2006 UTC (5 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +64 -52 lines
Instead of calling tcp_usr_detach() from tcp_usr_abort(), break out common pcb tear-down logic into tcp_detach(), which is called from either. Invoke tcp_drop() from the tcp_usr_abort() path rather than tcp_disconnect(), as we want to drop it immediately not perform a FIN sequence. This is one reason why some people were experiencing panics in sodealloc(), as the netisr and aborting thread were simultaneously trying to tear down the socket. This bug could often be reproduced using repeated runs of the listenclose regression test. MFC after: 3 months PR: 96090 Reported by: Peter Kostouros <kpeter at melbpc dot org dot au>, kris Tested by: Peter Kostouros <kpeter at melbpc dot org dot au>, kris
Revision 1.135: download - view: text, markup, annotated - select for diffs
Mon Apr 3 12:43:56 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +7 -5 lines
Clarify comment on handling of non-timewait TCP states in tcp_usr_detach(). MFC after: 3 months
Revision 1.134: download - view: text, markup, annotated - select for diffs
Mon Apr 3 09:52:55 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +3 -5 lines
After checking for SO_ISDISCONNECTED in tcp_usr_accept(), return immediately rather than jumping to the normal output handling, which assumes we've pulled out the inpcb, which hasn't happened at this point (and isn't necessary). Return ECONNABORTED instead of EINVAL when the inpcb has entered INP_TIMEWAIT or INP_DROPPED, as this is the documented error value. This may correct the panic seen by Ganbold. MFC after: 1 month Reported by: Ganbold <ganbold at micom dot mng dot net>
Revision 1.133: download - view: text, markup, annotated - select for diffs
Sun Apr 2 16:42:51 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +18 -7 lines
During reformulation of tcp_usr_detach(), the call to initiate TCP disconnect for fully connected sockets was dropped, meaning that if the socket was closed while the connection was alive, it would be leaked. Structure tcp_usr_detach() so that there are two clear parts: initiating disconnect, and reclaiming state, and reintroduce the tcp_disconnect() call in the first part. MFC after: 3 months
Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Apr 1 23:53:25 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +5 -2 lines
Properly handle an edge case previously not handled correctly: a socket can have a tcp connection that has entered time wait attached to it, in the event that shutdown() is called on the socket and the FINs properly exchange before close(). In this case we don't detach or free the inpcb, just leave the tcptw detached and freed, but we must release the inpcb lock (which we didn't previously). MFC after: 3 months
Revision 1.131: download - view: text, markup, annotated - select for diffs
Sat Apr 1 16:36:36 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +382 -187 lines
Update TCP for infrastructural changes to the socket/pcb refcount model, pru_abort(), pru_detach(), and in_pcbdetach(): - Universally support and enforce the invariant that so_pcb is never NULL, converting dozens of unnecessary NULL checks into assertions, and eliminating dozens of unnecessary error handling cases in protocol code. - In some cases, eliminate unnecessary pcbinfo locking, as it is no longer required to ensure so_pcb != NULL. For example, the receive code no longer requires the pcbinfo lock, and the send code only requires it if building a new connection on an otherwise unconnected socket triggered via sendto() with an address. This should significnatly reduce tcbinfo lock contention in the receive and send cases. - In order to support the invariant that so_pcb != NULL, it is now necessary for the TCP code to not discard the tcpcb any time a connection is dropped, but instead leave the tcpcb until the socket is shutdown. This case is handled by setting INP_DROPPED, to substitute for using a NULL so_pcb to indicate that the connection has been dropped. This requires the inpcb lock, but not the pcbinfo lock. - Unlike all other protocols in the tree, TCP may need to retain access to the socket after the file descriptor has been closed. Set SS_PROTOREF in tcp_detach() in order to prevent the socket from being freed, and add a flag, INP_SOCKREF, so that the TCP code knows whether or not it needs to free the socket when the connection finally does close. The typical case where this occurs is if close() is called on a TCP socket before all sent data in the send socket buffer has been transmitted or acknowledged. If INP_SOCKREF is found when the connection is dropped, we release the inpcb, tcpcb, and socket instead of flagging INP_DROPPED. - Abort and detach protocol switch methods no longer return failures, nor attempt to free sockets, as the socket layer does this. - Annotate the existence of a long-standing race in the TCP timer code, in which timers are stopped but not drained when the socket is freed, as waiting for drain may lead to deadlocks, or have to occur in a context where waiting is not permitted. This race has been handled by testing to see if the tcpcb pointer in the inpcb is NULL (and vice versa), which is not normally permitted, but may be true of a inpcb and tcpcb have been freed. Add a counter to test how often this race has actually occurred, and a large comment for each instance where we compare potentially freed memory with NULL. This will have to be fixed in the near future, but requires is to further address how to handle the timer shutdown shutdown issue. - Several TCP calls no longer potentially free the passed inpcb/tcpcb, so no longer need to return a pointer to indicate whether the argument passed in is still valid. - Un-macroize debugging and locking setup for various protocol switch methods for TCP, as it lead to more obscurity, and as locking becomes more customized to the methods, offers less benefit. - Assert copyright on tcp_usrreq.c due to significant modifications that have been made as part of this work. These changes significantly modify the memory management and connection logic of our TCP implementation, and are (as such) High Risk Changes, and likely to contain serious bugs. Please report problems to the current@ mailing list ASAP, ideally with simple test cases, and optionally, packet traces. MFC after: 3 months
Revision 1.130: download - view: text, markup, annotated - select for diffs
Sat Apr 1 15:42:00 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +2 -4 lines
Chance protocol switch method pru_detach() so that it returns void rather than an error. Detaches do not "fail", they other occur or the protocol flags SS_PROTOREF to take ownership of the socket. soclose() no longer looks at so_pcb to see if it's NULL, relying entirely on the protocol to decide whether it's time to free the socket or not using SS_PROTOREF. so_pcb is now entirely owned and managed by the protocol code. Likewise, no longer test so_pcb in other socket functions, such as soreceive(), which have no business digging into protocol internals. Protocol detach routines no longer try to free the socket on detach, this is performed in the socket code if the protocol permits it. In rts_detach(), no longer test for rp != NULL in detach, and likewise in other protocols that don't permit a NULL so_pcb, reduce the incidence of testing for it during detach. netinet and netinet6 are not fully updated to this change, which will be in an upcoming commit. In their current state they may leak memory or panic. MFC after: 3 months
Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Apr 1 15:15:04 2006 UTC (5 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +13 -5 lines
Change protocol switch pru_abort() API so that it returns void rather than an int, as an error here is not meaningful. Modify soabort() to unconditionally free the socket on the return of pru_abort(), and modify most protocols to no longer conditionally free the socket, since the caller will do this. This commit likely leaves parts of netinet and netinet6 in a situation where they may panic or leak memory, as they have not are not fully updated by this commit. This will be corrected shortly in followup commits to these components. MFC after: 3 months
Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Dec 14 22:27:48 2005 UTC (6 years, 1 month ago) by mux
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +2 -2 lines
Fix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to match the type of the variable they are exporting. Spotted by: Thomas Hurst <tom@hur.st> MFC after: 3 days
Revision 1.124.2.2: download - view: text, markup, annotated - select for diffs
Fri Nov 4 20:26:14 2005 UTC (6 years, 3 months ago) by ume
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.124.2.1: preferred, colored; branchpoint 1.124: preferred, colored
Changes since revision 1.124.2.1: +2 -0 lines
MFC: scope cleanup. with this change
- most of the kernel code will not care about the actual encoding of
scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
scoped addresses as a special case.
- scope boundary check will be stricter. For example, the current
*BSD code allows a packet with src=::1 and dst=(some global IPv6
address) to be sent outside of the node, if the application do:
s = socket(AF_INET6);
bind(s, "::1");
sendto(s, some_global_IPv6_addr);
This is clearly wrong, since ::1 is only meaningful within a single
node, but the current implementation of the *BSD kernel cannot
reject this attempt.
sys/net/if_gif.c: 1.53
sys/net/if_spppsubr.c: 1.120
sys/netinet/icmp6.h: 1.19
sys/netinet/ip_carp.c: 1.28,1.29
sys/netinet/ip_fw2.c: 1.107
sys/netinet/tcp_subr.c: 1.230,1.231,1.235
sys/netinet/tcp_usrreq.c: 1.125
sys/netinet6/ah_core.c: 1.26
sys/netinet6/icmp6.c: 1.63,1.64
sys/netinet6/in6.c: 1.52
sys/netinet6/in6.h: 1.38
sys/netinet6/in6_cksum.c: 1.11
sys/netinet6/in6_ifattach.c: 1.27
sys/netinet6/in6_pcb.c: 1.63
sys/netinet6/in6_proto.c: 1.33
sys/netinet6/in6_src.c: 1.31,1.32
sys/netinet6/in6_var.h: 1.22
sys/netinet6/ip6_forward.c: 1.29
sys/netinet6/ip6_input.c: 1.83
sys/netinet6/ip6_mroute.c: 1.30
sys/netinet6/ip6_output.c: 1.95
sys/netinet6/ip6_var.h: 1.33
sys/netinet6/ipsec.c: 1.43
sys/netinet6/mld6.c: 1.21
sys/netinet6/nd6.c: 1.50
sys/netinet6/nd6_nbr.c: 1.30
sys/netinet6/nd6_rtr.c: 1.27
sys/netinet6/raw_ip6.c: 1.54
sys/netinet6/route6.c: 1.12
sys/netinet6/scope6.c: 1.13,1.14,1.15
sys/netinet6/scope6_var.h: 1.5
sys/netinet6/udp6_output.c: 1.23
sys/netinet6/udp6_usrreq.c: 1.55
sys/netkey/key.c: 1.72,1.73
Revision 1.127: download - view: text, markup, annotated - select for diffs
Sun Oct 30 19:44:40 2005 UTC (6 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +4 -4 lines
Push the assignment of a new or updated so_qlimit from solisten() following the protocol pru_listen() call to solisten_proto(), so that it occurs under the socket lock acquisition that also sets SO_ACCEPTCONN. This requires passing the new backlog parameter to the protocol, which also allows the protocol to be aware of changes in queue limit should it wish to do something about the new queue limit. This continues a move towards the socket layer acting as a library for the protocol. Bump __FreeBSD_version due to a change in the in-kernel protocol interface. This change has been tested with IPv4 and UNIX domain sockets, but not other protocols.
Revision 1.124.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 9 03:17:41 2005 UTC (6 years, 4 months ago) by delphij
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +0 -5 lines
MFC (by andre) | Remove unnecessary IPSEC includes. | | MFC after: 2 weeks | Sponsored by: TCP/IP Optimization Fundraise 2005 | | Revision Changes Path | 1.27 +0 -11 src/sys/netinet/tcp_sack.c | 1.126 +0 -5 src/sys/netinet/tcp_usrreq.c Approved by: re (scottl)
Revision 1.126: download - view: text, markup, annotated - select for diffs
Tue Aug 23 14:42:40 2005 UTC (6 years, 5 months ago) by andre
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +0 -5 lines
Remove unnecessary IPSEC includes. MFC after: 2 weeks Sponsored by: TCP/IP Optimization Fundraise 2005
Revision 1.125: download - view: text, markup, annotated - select for diffs
Mon Jul 25 12:31:42 2005 UTC (6 years, 6 months ago) by ume
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +2 -0 lines
scope cleanup. with this change
- most of the kernel code will not care about the actual encoding of
scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
scoped addresses as a special case.
- scope boundary check will be stricter. For example, the current
*BSD code allows a packet with src=::1 and dst=(some global IPv6
address) to be sent outside of the node, if the application do:
s = socket(AF_INET6);
bind(s, "::1");
sendto(s, some_global_IPv6_addr);
This is clearly wrong, since ::1 is only meaningful within a single
node, but the current implementation of the *BSD kernel cannot
reject this attempt.
Submitted by: JINMEI Tatuya <jinmei__at__isl.rdc.toshiba.co.jp>
Obtained from: KAME
Revision 1.107.2.6: download - view: text, markup, annotated - select for diffs
Tue Jun 14 12:01:03 2005 UTC (6 years, 7 months ago) by rwatson
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.107.2.5: preferred, colored; branchpoint 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107.2.5: +8 -1 lines
Merge tcp_usrreq.c:1.123 from HEAD to RELENG_5: Assert tcbinfo lock, inpcb lock in tcp_disconnect(). Assert tcbinfo lock, inpcb lock in in tcp_usrclosed().
Revision 1.107.2.5: download - view: text, markup, annotated - select for diffs
Tue Jun 14 11:57:44 2005 UTC (6 years, 7 months ago) by rwatson
Branches: RELENG_5
Diff to: previous 1.107.2.4: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.4: +2 -0 lines
Merge tcp_usrreq.c:1.122 from HEAD to RELENG_5: Assert tcbinfo lock in tcp_attach(), as it is required; the caller (tcp_usr_attach()) currently grabs it.
Revision 1.107.2.4: download - view: text, markup, annotated - select for diffs
Thu Jun 9 07:32:50 2005 UTC (6 years, 8 months ago) by rwatson
Branches: RELENG_5
Diff to: previous 1.107.2.3: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.3: +2 -0 lines
Merge tcp_usrreq.c:1.124 from HEAD to RELENG_5: When aborting tcp_attach() due to a problem allocating or attaching the tcpcb, lock the inpcb before calling in_pcbdetach() or in6_pcbdetach(), as they expect the inpcb to be passed locked.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Wed Jun 1 12:14:56 2005 UTC (6 years, 8 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -0 lines
When aborting tcp_attach() due to a problem allocating or attaching the tcpcb, lock the inpcb before calling in_pcbdetach() or in6_pcbdetach(), as they expect the inpcb to be passed locked. MFC after: 7 days
Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Jun 1 12:08:15 2005 UTC (6 years, 8 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +8 -1 lines
Assert tcbinfo lock, inpcb lock in tcp_disconnect(). Assert tcbinfo lock, inpcb lock in in tcp_usrclosed(). MFC after: 7 days
Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Jun 1 11:44:43 2005 UTC (6 years, 8 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +2 -0 lines
Assert tcbinfo lock in tcp_attach(), as it is required; the caller (tcp_usr_attach()) currently grabs it. MFC after: 7 days
Revision 1.121: download - view: text, markup, annotated - select for diffs
Sat May 21 00:38:29 2005 UTC (6 years, 8 months ago) by ps
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -2 lines
Replace t_force with a t_flag (TF_FORCEDATA). Submitted by: Raja Mukerji. Reviewed by: Mohan, Silby, Andre Opperman.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Sun May 1 14:01:38 2005 UTC (6 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +0 -1 lines
Remove now unused inirw variable from previous use of COMMON_END(). Reported by: csjp
Revision 1.119: download - view: text, markup, annotated - select for diffs
Sun May 1 13:06:05 2005 UTC (6 years, 9 months ago) by grehan
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +1 -1 lines
Fix typo in last commit. Approved by: rwatson
Revision 1.118: download - view: text, markup, annotated - select for diffs
Sun May 1 11:11:38 2005 UTC (6 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +13 -2 lines
Slide unlocking of the tcbinfo lock earlier in tcp_usr_send(), as it's needed only for implicit connect cases. Under load, especially on SMP, this can greatly reduce contention on the tcbinfo lock. NB: Ambiguities about the state of so_pcb need to be resolved so that all use of the tcbinfo lock in non-implicit connection cases can be eliminated. Submited by: Kazuaki Oda <kaakun at highway dot ne dot jp>
Revision 1.107.2.3: download - view: text, markup, annotated - select for diffs
Fri Apr 1 05:38:58 2005 UTC (6 years, 10 months ago) by rwatson
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.107.2.2: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.2: +4 -1 lines
Merge tcp_usrreq.c:1.116 from HEAD to RELENG_5: In tcp_usr_send(), broaden coverage of the socket buffer lock in the non-OOB case so that the sbspace() check is performed under the same lock instance as the append to the send socket buffer. Approved by: re (kensmith)
Revision 1.117: download - view: text, markup, annotated - select for diffs
Tue Mar 29 01:10:46 2005 UTC (6 years, 10 months ago) by sam
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +1 -1 lines
eliminate extraneous null ptr checks Noticed by: Coverity Prevent analysis tool
Revision 1.116: download - view: text, markup, annotated - select for diffs
Mon Mar 14 22:15:14 2005 UTC (6 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +4 -1 lines
In tcp_usr_send(), broaden coverage of the socket buffer lock in the non-OOB case so that the sbspace() check is performed under the same lock instance as the append to the send socket buffer. MFC after: 1 week
Revision 1.107.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 7 13:08:05 2005 UTC (6 years, 11 months ago) by rwatson
Branches: RELENG_5
Diff to: previous 1.107.2.1: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.1: +14 -4 lines
Merge uipc_socket.c:1.233, uipc_usrreq.c:1.151, atm_cm.c:1.33,
atm_socket.c:1.23, atm_var.h:1.26, ipatm_load.c:1.l21,
ng_btsocket_l2cap.c:1.16, ng_btsocket_rfcomm.c:1.15, tcp_usrreq.c:1.15,
spx_usrreq.c:1.62, socketvar.h:1.139 from HEAD to RELENG_5:
In the current world order, solisten() implements the state transition of
a socket from a regular socket to a listening socket able to accept new
connections. As part of this state transition, solisten() calls into the
protocol to update protocol-layer state. There were several bugs in this
implementation that could result in a race wherein a TCP SYN received
in the interval between the protocol state transition and the shortly
following socket layer transition would result in a panic in the TCP code,
as the socket would be in the TCPS_LISTEN state, but the socket would not
have the SO_ACCEPTCONN flag set.
This change does the following:
- Pushes the socket state transition from the socket layer solisten() to
to socket "library" routines called from the protocol. This permits
the socket routines to be called while holding the protocol mutexes,
preventing a race exposing the incomplete socket state transition to TCP
after the TCP state transition has completed. The check for a socket
layer state transition is performed by solisten_proto_check(), and the
actual transition is performed by solisten_proto().
- Holds the socket lock for the duration of the socket state test and set,
and over the protocol layer state transition, which is now possible as
the socket lock is acquired by the protocol layer, rather than vice
versa. This prevents additional state related races in the socket
layer.
This permits the dual transition of socket layer and protocol layer state
to occur while holding locks for both layers, making the two changes
atomic with respect to one another. Similar changes are likely require
elsewhere in the socket/protocol code.
Reported by: Peter Holm <peter@holm.cc>
Review and fixes from: emax, Antoine Brodin <antoine.brodin@laposte.net>
Philosophical head nod: gnn
Note that this changes the behavior of the pru_listen() protocol entry point;
all protocols are updated to match the new behavior. We do not know of any
third party protocol implementations that this might cause problems for.
Approved by: re (kensmith)
Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Feb 21 21:58:17 2005 UTC (6 years, 11 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +14 -4 lines
In the current world order, solisten() implements the state transition of a socket from a regular socket to a listening socket able to accept new connections. As part of this state transition, solisten() calls into the protocol to update protocol-layer state. There were several bugs in this implementation that could result in a race wherein a TCP SYN received in the interval between the protocol state transition and the shortly following socket layer transition would result in a panic in the TCP code, as the socket would be in the TCPS_LISTEN state, but the socket would not have the SO_ACCEPTCONN flag set. This change does the following: - Pushes the socket state transition from the socket layer solisten() to to socket "library" routines called from the protocol. This permits the socket routines to be called while holding the protocol mutexes, preventing a race exposing the incomplete socket state transition to TCP after the TCP state transition has completed. The check for a socket layer state transition is performed by solisten_proto_check(), and the actual transition is performed by solisten_proto(). - Holds the socket lock for the duration of the socket state test and set, and over the protocol layer state transition, which is now possible as the socket lock is acquired by the protocol layer, rather than vice versa. This prevents additional state related races in the socket layer. This permits the dual transition of socket layer and protocol layer state to occur while holding locks for both layers, making the two changes atomic with respect to one another. Similar changes are likely require elsewhere in the socket/protocol code. Reported by: Peter Holm <peter@holm.cc> Review and fixes from: emax, Antoine Brodin <antoine.brodin@laposte.net> Philosophical head nod: gnn
Revision 1.114: download - view: text, markup, annotated - select for diffs
Mon Feb 14 07:37:50 2005 UTC (6 years, 11 months ago) by maxim
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +0 -87 lines
o Add handling of an IPv4-mapped IPv6 address. o Use SYSCTL_IN() macro instead of direct call of copyin(9). Submitted by: ume o Move sysctl_drop() implementation to sys/netinet/tcp_subr.c where most of tcp sysctls live. o There are net.inet[6].tcp[6].getcred sysctls already, no needs in a separate struct tcp_ident_mapping. Suggested by: ume
Revision 1.113: download - view: text, markup, annotated - select for diffs
Sun Feb 6 10:47:11 2005 UTC (7 years ago) by maxim
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +86 -0 lines
o Implement net.inet.tcp.drop sysctl and userland part, tcpdrop(8) utility: The tcpdrop command drops the TCP connection specified by the local address laddr, port lport and the foreign address faddr, port fport. Obtained from: OpenBSD Reviewed by: rwatson (locking), ru (man page), -current MFC after: 1 month
Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:26:37 2005 UTC (7 years ago) by imp
Branches: RELENG_5
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +1 -1 lines
MFC: /*- and related license changes
Revision 1.51.2.23: download - view: text, markup, annotated - select for diffs
Sat Jan 15 15:58:17 2005 UTC (7 years ago) by dwmalone
Branches: RELENG_4
Diff to: previous 1.51.2.22: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.22: +6 -2 lines
MFC: 1.104 of tcp_usrreq.c when IN6P_AUTOFLOWLABEL is set, set the flowlabel on outgoing tcp connections.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Jan 7 01:45:45 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +1 -1 lines
/* -> /*- for license, minor formatting changes
Revision 1.111: download - view: text, markup, annotated - select for diffs
Sat Nov 27 20:20:11 2004 UTC (7 years, 2 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +1 -0 lines
Do export the advertised receive window via the tcpi_rcv_space field of struct tcp_info.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Nov 26 18:58:46 2004 UTC (7 years, 2 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +54 -2 lines
Implement parts of the TCP_INFO socket option as found in Linux 2.6. This socket option allows processes query a TCP socket for some low level transmission details, such as the current send, bandwidth, and congestion windows. Linux provides a 'struct tcpinfo' structure containing various variables, rather than separate socket options; this makes the API somewhat fragile as it makes it dificult to add new entries of interest as requirements and implementation evolve. As such, I've included a large pad at the end of the structure. Right now, relatively few of the Linux API fields are filled in, and some contain no logical equivilent on FreeBSD. I've include __'d entries in the structure to make it easier to figure ou what is and isn't omitted. This API/ABI should be considered unstable for the time being.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon Nov 8 14:44:53 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +32 -11 lines
Initialize struct pr_userreqs in new/sparse style and fill in common default elements in net_init_domain(). This makes it possible to grep these structures and see any bogosities.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Tue Nov 2 22:22:21 2004 UTC (7 years, 3 months ago) by andre
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +4 -69 lines
Remove RFC1644 T/TCP support from the TCP side of the network stack. A complete rationale and discussion is given in this message and the resulting discussion: http://docs.freebsd.org/cgi/mid.cgi?4177C8AD.6060706 Note that this commit removes only the functional part of T/TCP from the tcp_* related functions in the kernel. Other features introduced with RFC1644 are left intact (socket layer changes, sendmsg(2) on connection oriented protocols) and are meant to be reused by a simpler and less intrusive reimplemention of the previous T/TCP functionality. Discussed on: -arch
Revision 1.107: download - view: text, markup, annotated - select for diffs
Mon Aug 16 18:32:07 2004 UTC (7 years, 5 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +9 -9 lines
White space cleanup for netinet before branch: - Trailing tab/space cleanup - Remove spurious spaces between or before tabs This change avoids touching files that Andre likely has in his working set for PFIL hooks changes for IPFW/DUMMYNET. Approved by: re (scottl) Submitted by: Xin LI <delphij@frontfree.net>
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Aug 14 15:32:19 2004 UTC (7 years, 5 months ago) by dwmalone
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +1 -6 lines
Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD
have already done this, so I have styled the patch on their work:
1) introduce a ip_newid() static inline function that checks
the sysctl and then decides if it should return a sequential
or random IP ID.
2) named the sysctl net.inet.ip.random_id
3) IPv6 flow IDs and fragment IDs are now always random.
Flow IDs and frag IDs are significantly less common in the
IPv6 world (ie. rarely generated per-packet), so there should
be smaller performance concerns.
The sysctl defaults to 0 (sequential IP IDs).
Reviewed by: andre, silby, mlaier, ume
Based on: NetBSD
MFC after: 2 months
Revision 1.105: download - view: text, markup, annotated - select for diffs
Mon Jul 26 21:29:56 2004 UTC (7 years, 6 months ago) by jmg
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -2 lines
compare pointer against NULL, not 0 when inpcb is NULL, this is no longer invalid since jlemon added the tcp_twstart function... this prevents close "failing" w/ EINVAL when it really was successful... Reviewed by: jeremy (NetBSD)
Revision 1.104: download - view: text, markup, annotated - select for diffs
Fri Jul 16 18:08:13 2004 UTC (7 years, 6 months ago) by ume
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +10 -2 lines
when IN6P_AUTOFLOWLABEL is set, the flowlabel is not set on outgoing tcp connections. Reported by: Orla McGann <orly@cnri.dit.ie> Reviewed by: Orla McGann <orly@cnri.dit.ie> Obtained from: KAME
Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Jun 26 17:50:50 2004 UTC (7 years, 7 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +1 -32 lines
Remove spl's from TCP protocol entry points. While not all locking is merged here yet, this will ease the merge process by bringing the locked and unlocked versions into sync.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Jun 18 20:22:21 2004 UTC (7 years, 7 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +1 -1 lines
In tcp_ctloutput(), don't hold the inpcb lock over a call to ip_ctloutput(), as it may need to perform blocking memory allocations. This also improves consistency with locking relative to other points that call into ip_ctloutput(). Bumped into by: Grover Lines <grover@ceribus.net>
Revision 1.101: download - view: text, markup, annotated - select for diffs
Mon Jun 14 18:16:21 2004 UTC (7 years, 7 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +2 -2 lines
The socket field so_state is used to hold a variety of socket related flags relating to several aspects of socket functionality. This change breaks out several bits relating to send and receive operation into a new per-socket buffer field, sb_state, in order to facilitate locking. This is required because, in order to provide more granular locking of sockets, different state fields have different locking properties. The following fields are moved to sb_state: SS_CANTRCVMORE (so_state) SS_CANTSENDMORE (so_state) SS_RCVATMARK (so_state) Rename respectively to: SBS_CANTRCVMORE (so_rcv.sb_state) SBS_CANTSENDMORE (so_snd.sb_state) SBS_RCVATMARK (so_rcv.sb_state) This facilitates locking by isolating fields to be located with other identically locked fields, and permits greater granularity in socket locking by avoiding storing fields with different locking semantics in the same short (avoiding locking conflicts). In the future, we may wish to coallesce sb_state and sb_flags; for the time being I leave them separate and there is no additional memory overhead due to the packing/alignment of shorts in the socket buffer structure.
Revision 1.51.2.21.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 24 04:52:38 2004 UTC (7 years, 9 months ago) by truckman
Branches: RELENG_4_10
CVS tags: RELENG_4_10_0_RELEASE
Diff to: previous 1.51.2.21: preferred, colored; next MAIN 1.51.2.22: preferred, colored
Changes since revision 1.51.2.21: +16 -8 lines
MFS tcp_usrreq.c 1.51.2.22:
Don't skip the splx() call in *_usr_bind() and *_usr_connect()
if the socket address length check fails.
Submitted by: pjd
Approved by: re (kensmith)
Revision 1.51.2.22: download - view: text, markup, annotated - select for diffs
Fri Apr 23 19:49:08 2004 UTC (7 years, 9 months ago) by truckman
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11
Diff to: previous 1.51.2.21: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.21: +16 -8 lines
Don't skip the splx() call in *_usr_bind() and *_usr_connect() if the socket address length check fails. This is similar to the fix in revision 1.99, except this version of the fix does not move the sanity checks out from under the spl. Submitted by: pjd Pointy hat to: truckman
Revision 1.100: download - view: text, markup, annotated - select for diffs
Wed Apr 7 20:46:14 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +0 -4 lines
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun Apr 4 20:14:55 2004 UTC (7 years, 10 months ago) by pjd
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +26 -37 lines
Fix a panic possibility caused by returning without releasing locks. It was fixed by moving problemetic checks, as well as checks that doesn't need locking before locks are acquired. Submitted by: Ryan Sommers <ryans@gamersimpact.com> In co-operation with: cperciva, maxim, mlaier, sam Tested by: submitter (previous patch), me (current patch) Reviewed by: cperciva, mlaier (previous patch), sam (current patch) Approved by: sam Dedicated to: enough!
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Mar 28 15:48:00 2004 UTC (7 years, 10 months ago) by pjd
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -4 lines
Remove unused argument.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sat Mar 27 21:05:45 2004 UTC (7 years, 10 months ago) by pjd
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +9 -8 lines
Reduce 'td' argument to 'cred' (struct ucred) argument in those functions: - in_pcbbind(), - in_pcbbind_setup(), - in_pcbconnect(), - in_pcbconnect_setup(), - in6_pcbbind(), - in6_pcbconnect(), - in6_pcbsetport(). "It should simplify/clarify things a great deal." --rwatson Requested by: rwatson Reviewed by: rwatson, ume
Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Mar 27 20:41:32 2004 UTC (7 years, 10 months ago) by pjd
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +1 -1 lines
Remove unused argument. Reviewed by: ume
Revision 1.51.2.21: download - view: text, markup, annotated - select for diffs
Mon Mar 22 23:59:55 2004 UTC (7 years, 10 months ago) by ps
Branches: RELENG_4
CVS tags: RELENG_4_10_BP
Branch point for: RELENG_4_10
Diff to: previous 1.51.2.20: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.20: +3 -3 lines
MFC: speedup stream socket recv handling by tracking the tail of the mbuf chain instead of walking the list for each append. This has been pretty well tested at Yahoo! Obtained from: netbsd (jason thorpe) Reviewed by: silby
Revision 1.51.2.20: download - view: text, markup, annotated - select for diffs
Thu Feb 19 11:58:14 2004 UTC (7 years, 11 months ago) by truckman
Branches: RELENG_4
Diff to: previous 1.51.2.19: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.19: +8 -0 lines
MFC 1.92 - Check that sa_len is the appropriate value in tcp_usr_bind(),
tcp6_usr_bind(), tcp_usr_connect(), and tcp6_usr_connect()
before checking whether the address is multicast so that the
proper errno value will be returned if sa_len is incorrect.
Revision 1.51.2.19: download - view: text, markup, annotated - select for diffs
Mon Feb 16 22:21:47 2004 UTC (7 years, 11 months ago) by bms
Branches: RELENG_4
Diff to: previous 1.51.2.18: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.18: +2 -2 lines
MFC: Shorten the name of the socket option used to enable TCP-MD5 packet treatment. Submitted by: Vincent Jardin
Revision 1.95: download - view: text, markup, annotated - select for diffs
Mon Feb 16 22:21:16 2004 UTC (7 years, 11 months ago) by bms
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +2 -2 lines
Shorten the name of the socket option used to enable TCP-MD5 packet treatment. Submitted by: Vincent Jardin
Revision 1.51.2.18: download - view: text, markup, annotated - select for diffs
Sat Feb 14 22:23:23 2004 UTC (7 years, 11 months ago) by bms
Branches: RELENG_4
Diff to: previous 1.51.2.17: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.17: +22 -0 lines
MFC: Import of TCP-MD5 (RFC2385) support. Sponsored by: sentex.net
Revision 1.94: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:21:45 2004 UTC (7 years, 11 months ago) by bms
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +1 -1 lines
Brucification. Submitted by: bde
Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Feb 11 04:26:02 2004 UTC (8 years ago) by bms
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +19 -0 lines
Initial import of RFC 2385 (TCP-MD5) digest support. This is the first of two commits; bringing in the kernel support first. This can be enabled by compiling a kernel with options TCP_SIGNATURE and FAST_IPSEC. For the uninitiated, this is a TCP option which provides for a means of authenticating TCP sessions which came into being before IPSEC. It is still relevant today, however, as it is used by many commercial router vendors, particularly with BGP, and as such has become a requirement for interconnect at many major Internet points of presence. Several parts of the TCP and IP headers, including the segment payload, are digested with MD5, including a shared secret. The PF_KEY interface is used to manage the secrets using security associations in the SADB. There is a limitation here in that as there is no way to map a TCP flow per-port back to an SPI without polluting tcpcb or using the SPD; the code to do the latter is unstable at this time. Therefore this code only supports per-host keying granularity. Whilst FAST_IPSEC is mutually exclusive with KAME IPSEC (and thus IPv6), TCP_SIGNATURE applies only to IPv4. For the vast majority of prospective users of this feature, this will not pose any problem. This implementation is output-only; that is, the option is honoured when responding to a host initiating a TCP session, but no effort is made [yet] to authenticate inbound traffic. This is, however, sufficient to interwork with Cisco equipment. Tested with a Cisco 2501 running IOS 12.0(27), and Quagga 0.96.4 with local patches. Patches for tcpdump to validate TCP-MD5 sessions are also available from me upon request. Sponsored by: sentex.net
Revision 1.92: download - view: text, markup, annotated - select for diffs
Sat Jan 10 08:53:00 2004 UTC (8 years, 1 month ago) by truckman
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +8 -0 lines
Check that sa_len is the appropriate value in tcp_usr_bind(), tcp6_usr_bind(), tcp_usr_connect(), and tcp6_usr_connect() before checking to see whether the address is multicast so that the proper errno value will be returned if sa_len is incorrect. The checks are identical to the ones in in_pcbbind_setup(), in6_pcbbind(), and in6_pcbladdr(), which are called after the multicast address check passes. MFC after: 30 days
Revision 1.90.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 9 12:32:36 2004 UTC (8 years, 1 month ago) by andre
Branches: RELENG_5_2
CVS tags: RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE
Diff to: previous 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90: +2 -1 lines
MFC: Limiters and sanity checks for TCP MSS resource exhaustion attacks. The net.inet.tcp.minmssoverload is set to zero and thus connection drop is disabled by default. Approved by: re (scottl)
Revision 1.91: download - view: text, markup, annotated - select for diffs
Thu Jan 8 17:40:07 2004 UTC (8 years, 1 month ago) by andre
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +2 -1 lines
Limiters and sanity checks for TCP MSS (maximum segement size) resource exhaustion attacks. For network link optimization TCP can adjust its MSS and thus packet size according to the observed path MTU. This is done dynamically based on feedback from the remote host and network components along the packet path. This information can be abused to pretend an extremely low path MTU. The resource exhaustion works in two ways: o during tcp connection setup the advertized local MSS is exchanged between the endpoints. The remote endpoint can set this arbitrarily low (except for a minimum MTU of 64 octets enforced in the BSD code). When the local host is sending data it is forced to send many small IP packets instead of a large one. For example instead of the normal TCP payload size of 1448 it forces TCP payload size of 12 (MTU 64) and thus we have a 120 times increase in workload and packets. On fast links this quickly saturates the local CPU and may also hit pps processing limites of network components along the path. This type of attack is particularly effective for servers where the attacker can download large files (WWW and FTP). We mitigate it by enforcing a minimum MTU settable by sysctl net.inet.tcp.minmss defaulting to 256 octets. o the local host is reveiving data on a TCP connection from the remote host. The local host has no control over the packet size the remote host is sending. The remote host may chose to do what is described in the first attack and send the data in packets with an TCP payload of at least one byte. For each packet the tcp_input() function will be entered, the packet is processed and a sowakeup() is signalled to the connected process. For example an attack with 2 Mbit/s gives 4716 packets per second and the same amount of sowakeup()s to the process (and context switches). This type of attack is particularly effective for servers where the attacker can upload large amounts of data. Normally this is the case with WWW server where large POSTs can be made. We mitigate this by calculating the average MSS payload per second. If it goes below 'net.inet.tcp.minmss' and the pps rate is above 'net.inet.tcp.minmssoverload' defaulting to 1000 this particular TCP connection is resetted and dropped. MITRE CVE: CAN-2004-0002 Reviewed by: sam (mentor) MFC after: 1 day
Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Nov 26 01:40:43 2003 UTC (8 years, 2 months ago) by sam
Branches: MAIN
CVS tags: RELENG_5_2_BP
Branch point for: RELENG_5_2
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +1 -1 lines
Split the "inp" mutex class into separate classes for each of divert, raw, tcp, udp, raw6, and udp6 sockets to avoid spurious witness complaints. Reviewed by: rwatson Approved by: re (rwatson)
Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Nov 20 20:07:38 2003 UTC (8 years, 2 months ago) by andre
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +25 -20 lines
Introduce tcp_hostcache and remove the tcp specific metrics from the routing table. Move all usage and references in the tcp stack from the routing table metrics to the tcp hostcache. It caches measured parameters of past tcp sessions to provide better initial start values for following connections from or to the same source or destination. Depending on the network parameters to/from the remote host this can lead to significant speedups for new tcp connections after the first one because they inherit and shortcut the learning curve. tcp_hostcache is designed for multiple concurrent access in SMP environments with high contention and is hash indexed by remote ip address. It removes significant locking requirements from the tcp stack with regard to the routing table. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Nov 18 00:39:04 2003 UTC (8 years, 2 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +2 -2 lines
Introduce a MAC label reference in 'struct inpcb', which caches the MAC label referenced from 'struct socket' in the IPv4 and IPv6-based protocols. This permits MAC labels to be checked during network delivery operations without dereferencing inp->inp_socket to get to so->so_label, which will eventually avoid our having to grab the socket lock during delivery at the network layer. This change introduces 'struct inpcb' as a labeled object to the MAC Framework, along with the normal circus of entry points: initialization, creation from socket, destruction, as well as a delivery access control check. For most policies, the inpcb label will simply be a cache of the socket label, so a new protocol switch method is introduced, pr_sosetlabel() to notify protocols that the socket layer label has been updated so that the cache can be updated while holding appropriate locks. Most protocols implement this using pru_sosetlabel_null(), but IPv4/IPv6 protocols using inpcbs use the the worker function in_pcbsosetlabel(), which calls into the MAC Framework to perform a cache update. Biba, LOMAC, and MLS implement these entry points, as do the stub policy, and test policy. Reviewed by: sam, bms Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Oct 28 05:47:40 2003 UTC (8 years, 3 months ago) by sam
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +2 -2 lines
speedup stream socket recv handling by tracking the tail of the mbuf chain instead of walking the list for each append Submitted by: ps/jayanth Obtained from: netbsd (jason thorpe)
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sat Mar 8 22:07:52 2003 UTC (8 years, 11 months ago) by jlemon
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +15 -13 lines
Remove check for t_state == TCPS_TIME_WAIT and introduce the tw structure. Sponsored by: DARPA, NAI Labs
Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Feb 25 01:32:03 2003 UTC (8 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +4 -4 lines
Hold the TCP protocol lock while modifying the connection hash table.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Oct 24 02:02:34 2002 UTC (9 years, 3 months ago) by iedowse
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -5 lines
Unbreak the automatic remapping of an INADDR_ANY destination address to the primary local IP address when doing a TCP connect(). The tcp_connect() code was relying on in_pcbconnect (actually in_pcbladdr) modifying the passed-in sockaddr, and I failed to notice this in the recent change that added in_pcbconnect_setup(). As a result, tcp_connect() was ending up using the unmodified sockaddr address instead of the munged version. There are two cases to handle: if in_pcbconnect_setup() succeeds, then the PCB has already been updated with the correct destination address as we pass it pointers to inp_faddr and inp_fport directly. If in_pcbconnect_setup() fails due to an existing but dead connection, then copy the destination address from the old connection.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Mon Oct 21 13:55:50 2002 UTC (9 years, 3 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +12 -14 lines
Replace in_pcbladdr() with a more generic inner subroutine for in_pcbconnect() called in_pcbconnect_setup(). This version performs all of the functions of in_pcbconnect() except for the final committing of changes to the PCB. In the case of an EADDRINUSE error it can also provide to the caller the PCB of the duplicate connection, avoiding an extra in_pcblookup_hash() lookup in tcp_connect(). This change will allow the "temporary connect" hack in udp_output() to be removed and is part of the preparation for adding the IP_SENDSRCADDR control message. Discussed on: -net Approved by: re
Revision 1.51.2.17: download - view: text, markup, annotated - select for diffs
Fri Oct 11 11:46:44 2002 UTC (9 years, 4 months ago) by ume
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8
Diff to: previous 1.51.2.16: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.16: +4 -2 lines
MFC 1.79: Use a common way to release locks before exit.
Revision 1.51.2.16: download - view: text, markup, annotated - select for diffs
Sat Aug 24 18:40:26 2002 UTC (9 years, 5 months ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7
Diff to: previous 1.51.2.15: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.15: +2 -0 lines
MFC the TCP bandwidth-based window limiting code. Default operation is to not limit the window (feature disabled). Setting net.inet.tcp.inflight_enable to 1 will enable the feature. Differences from current: debugging defaults to off, and the window minimum is set to a production value of 6144 bytes rather then a debugging value of 1024 bytes. See 'man tcp' and 'man tuning' for more information.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu Aug 22 21:24:01 2002 UTC (9 years, 5 months ago) by archie
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -2 lines
Replace (ab)uses of "NULL" where "0" is really meant.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Aug 21 11:57:05 2002 UTC (9 years, 5 months ago) by truckman
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +43 -20 lines
Create new functions in_sockaddr(), in6_sockaddr(), and in6_v4mapsin6_sockaddr() which allocate the appropriate sockaddr_in* structure and initialize it with the address and port information passed as arguments. Use calls to these new functions to replace code that is replicated multiple times in in_setsockaddr(), in_setpeeraddr(), in6_setsockaddr(), in6_setpeeraddr(), in6_mapped_sockaddr(), and in6_mapped_peeraddr(). Inline COMMON_END in tcp_usr_accept() so that we can call in_sockaddr() with temporary copies of the address and port after the PCB is unlocked. Fix the lock violation in tcp6_usr_accept() (caused by calling MALLOC() inside in6_mapped_peeraddr() while the PCB is locked) by changing the implementation of tcp6_usr_accept() to match tcp_usr_accept(). Reviewed by: suz
Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Aug 17 18:26:02 2002 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -0 lines
Implement TCP bandwidth delay product window limiting, similar to (but not meant to duplicate) TCP/Vegas. Add four sysctls and default the implementation to 'off'. net.inet.tcp.inflight_enable enable algorithm (defaults to 0=off) net.inet.tcp.inflight_debug debugging (defaults to 1=on) net.inet.tcp.inflight_min minimum window limit net.inet.tcp.inflight_max maximum window limit MFC after: 1 week
Revision 1.51.2.15: download - view: text, markup, annotated - select for diffs
Thu Aug 8 16:47:27 2002 UTC (9 years, 6 months ago) by ume
Branches: RELENG_4
Diff to: previous 1.51.2.14: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.14: +3 -3 lines
MFC 1.78: make setsockopt(IPV6_V6ONLY, 0) actuall work for tcp6.
Revision 1.51.2.14: download - view: text, markup, annotated - select for diffs
Thu Aug 8 16:44:57 2002 UTC (9 years, 6 months ago) by ume
Branches: RELENG_4
Diff to: previous 1.51.2.13: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.13: +3 -5 lines
MFC: cleanup usage of ip6_mapped_addr_on and ip6_v6only. now, ip6_mapped_addr_on is unified into ip6_v6only. sys/netinet/in_pcb.c: 1.109 sys/netinet/tcp_usrreq.c: 1.77 sys/netinet6/ip6_var.h: 1.9 sys/netinet6/udp6_usrreq.c: 1.30
Revision 1.79: download - view: text, markup, annotated - select for diffs
Mon Jul 29 09:01:39 2002 UTC (9 years, 6 months ago) by maxim
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -2 lines
Use a common way to release locks before exit. Reviewed by: hsu
Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Jul 25 18:10:04 2002 UTC (9 years, 6 months ago) by ume
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -3 lines
make setsockopt(IPV6_V6ONLY, 0) actuall work for tcp6. MFC after: 1 week
Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Jul 25 17:40:44 2002 UTC (9 years, 6 months ago) by ume
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -5 lines
cleanup usage of ip6_mapped_addr_on and ip6_v6only. now, ip6_mapped_addr_on is unified into ip6_v6only. MFC after: 1 week
Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Jun 13 23:14:58 2002 UTC (9 years, 8 months ago) by hsu
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +0 -3 lines
Because we're holding an exclusive write lock on the head, references to the new inp cannot leak out even though it has been placed on the head list.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Jun 10 20:05:38 2002 UTC (9 years, 8 months ago) by hsu
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +161 -37 lines
Lock up inpcb. Submitted by: Jennifer Yang <yangjihui@yahoo.com>
Revision 1.51.2.12.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 7 20:54:02 2002 UTC (9 years, 8 months ago) by obrien
Branches: RELENG_4_6
CVS tags: RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE
Diff to: previous 1.51.2.12: preferred, colored; next MAIN 1.51.2.13: preferred, colored
Changes since revision 1.51.2.12: +1 -1 lines
MFC: rev 1.51.2.13 (reduce windows size to 57k). Requested by: murray
Revision 1.51.2.13: download - view: text, markup, annotated - select for diffs
Fri Jun 7 20:23:44 2002 UTC (9 years, 8 months ago) by obrien
Branches: RELENG_4
Diff to: previous 1.51.2.12: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.12: +1 -1 lines
IPfiler has problems with its keep state when the windows size is 64k. So reduce it to 57k for now. It should remain 64k in -CURRENT so we can force a fix in broken software. There is nice explanation in the PR about the environment in which the bug happens. Approved by: murray PR: 34801 Submitted by: AMAKAWA Shuhei <sa264@cam.ac.uk>
Revision 1.74: download - view: text, markup, annotated - select for diffs
Fri May 31 11:52:32 2002 UTC (9 years, 8 months ago) by tanimura
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +12 -51 lines
Back out my lats commit of locking down a socket, it conflicts with hsu's work. Requested by: hsu
Revision 1.73: download - view: text, markup, annotated - select for diffs
Mon May 20 05:41:05 2002 UTC (9 years, 8 months ago) by tanimura
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +51 -12 lines
Lock down a socket, milestone 1. o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred
Revision 1.72: download - view: text, markup, annotated - select for diffs
Sun Mar 24 10:19:10 2002 UTC (9 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
Fixed some style bugs in the removal of __P(()). Continuation lines were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Mar 19 21:25:46 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +7 -7 lines
Remove __P.
Revision 1.51.2.12: download - view: text, markup, annotated - select for diffs
Sun Mar 10 07:23:28 2002 UTC (9 years, 11 months ago) by ume
Branches: RELENG_4
CVS tags: RELENG_4_6_BP
Branch point for: RELENG_4_6
Diff to: previous 1.51.2.11: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.11: +1 -0 lines
MFC: - Set inc_isipv6 in tcp6_usr_connect(). - When making a pcb from a sync cache, do not forget to copy inc_isipv6. sys/netinet/tcp_syncache.c: 1.13 sys/netinet/tcp_usrreq.c: 1.70
Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Feb 28 17:11:10 2002 UTC (9 years, 11 months ago) by ume
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +1 -0 lines
- Set inc_isipv6 in tcp6_usr_connect(). - When making a pcb from a sync cache, do not forget to copy inc_isipv6. Obtained from: KAME MFC After: 1 week
Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Feb 27 18:32:17 2002 UTC (9 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -2 lines
Simple p_ucred -> td_ucred changes to start using the per-thread ucred reference.
Revision 1.51.2.11: download - view: text, markup, annotated - select for diffs
Fri Dec 14 20:14:43 2001 UTC (10 years, 1 month ago) by jlemon
Branches: RELENG_4
CVS tags: RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5
Diff to: previous 1.51.2.10: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.10: +16 -6 lines
MFC: r1.53,r1.68; TCP_NOPUSH fixes, syncache support.
Revision 1.51.2.10: download - view: text, markup, annotated - select for diffs
Fri Nov 30 19:54:05 2001 UTC (10 years, 2 months ago) by alfred
Branches: RELENG_4
Diff to: previous 1.51.2.9: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.9: +3 -3 lines
MFC: 1.64 (larger default tcp send/recieve buffers)
Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Nov 22 04:50:43 2001 UTC (10 years, 2 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3 lines
Introduce a syncache, which enables FreeBSD to withstand a SYN flood DoS in an improved fashion over the existing code. Reviewed by: silby (in a previous iteration) Sponsored by: DARPA, NAI Labs
Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:37:54 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: KSE_MILESTONE_2
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +36 -36 lines
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Revision 1.51.2.9: download - view: text, markup, annotated - select for diffs
Wed Aug 22 00:59:12 2001 UTC (10 years, 5 months ago) by silby
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.51.2.8: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.8: +3 -3 lines
Much delayed but now present: RFC 1948 style sequence numbers In order to ensure security and functionality, RFC 1948 style initial sequence number generation has been implemented. Barring any major crypographic breakthroughs, this algorithm should be unbreakable. In addition, the problems with TIME_WAIT recycling which affect our currently used algorithm are not present. Reviewed by: jesper Approved by: jkh
Revision 1.66: download - view: text, markup, annotated - select for diffs
Wed Aug 22 00:58:16 2001 UTC (10 years, 5 months ago) by silby
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -3 lines
Much delayed but now present: RFC 1948 style sequence numbers In order to ensure security and functionality, RFC 1948 style initial sequence number generation has been implemented. Barring any major crypographic breakthroughs, this algorithm should be unbreakable. In addition, the problems with TIME_WAIT recycling which affect our currently used algorithm are not present. Reviewed by: jesper
Revision 1.51.2.8: download - view: text, markup, annotated - select for diffs
Sun Jul 29 19:32:40 2001 UTC (10 years, 6 months ago) by ume
Branches: RELENG_4
Diff to: previous 1.51.2.7: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.7: +1 -13 lines
MFC: move ipsec security policy allocation into in_pcballoc, before making pcbs available to the outside world. otherwise, we will see inpcb without ipsec security policy attached (-> panic() in ipsec.c). sys/netinet/in_pcb.c: 1.86 sys/netinet/ip_divert.c: 1.50 sys/netinet/raw_ip.c: 1.80 sys/netinet/tcp_usrreq.c: 1.65 sys/netinet/udp_usrreq.c: 1.93 sys/netinet6/raw_ip6.c: 1.12 sys/netinet6/udp6_usrreq.c: 1.16
Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Jul 26 19:19:48 2001 UTC (10 years, 6 months ago) by ume
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -13 lines
move ipsec security policy allocation into in_pcballoc, before making pcbs available to the outside world. otherwise, we will see inpcb without ipsec security policy attached (-> panic() in ipsec.c). Obtained from: KAME MFC after: 3 days
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Jul 13 18:38:04 2001 UTC (10 years, 7 months ago) by obrien
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -3 lines
Bump net.inet.tcp.sendspace to 32k and net.inet.tcp.recvspace to 65k. This should help us in nieve benchmark "tests". It seems a wide number of people think 32k buffers would not cause major issues, and is in fact in use by many other OS's at this time. The receive buffers can be bumped higher as buffers are hardly used and several research papers indicate that receive buffers rarely use much space at all. Submitted by: Leo Bicknell <bicknell@ufp.org> <20010713101107.B9559@ussenterprise.ufp.org> Agreed to in principle by: dillon (at the 32k level)
Revision 1.51.2.7: download - view: text, markup, annotated - select for diffs
Sun Jul 8 02:21:44 2001 UTC (10 years, 7 months ago) by silby
Branches: RELENG_4
Diff to: previous 1.51.2.6: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.6: +3 -3 lines
MFC: Runetime tuneable tcp initial sequence number generation schemes.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun Jul 8 02:20:47 2001 UTC (10 years, 7 months ago) by silby
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3 lines
Temporary feature: Runtime tuneable tcp initial sequence number generation scheme. Users may now select between the currently used OpenBSD algorithm and the older random positive increment method. While the OpenBSD algorithm is more secure, it also breaks TIME_WAIT handling; this is causing trouble for an increasing number of folks. To switch between generation schemes, one sets the sysctl net.inet.tcp.tcp_seq_genscheme. 0 = random positive increments, 1 = the OpenBSD algorithm. 1 is still the default. Once a secure _and_ compatible algorithm is implemented, this sysctl will be removed. Reviewed by: jlemon Tested by: numerous subscribers of -net
Revision 1.51.2.6: download - view: text, markup, annotated - select for diffs
Sat Jul 7 04:30:38 2001 UTC (10 years, 7 months ago) by silby
Branches: RELENG_4
Diff to: previous 1.51.2.5: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.5: +1 -13 lines
MFC of tcp template removal + jlemon's patch to improve header generation performance.
Revision 1.51.2.5: download - view: text, markup, annotated - select for diffs
Tue Jul 3 11:01:47 2001 UTC (10 years, 7 months ago) by ume
Branches: RELENG_4
Diff to: previous 1.51.2.4: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.4: +8 -6 lines
MFC: Sync with recent KAME. This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge. etc/defaults/rc.conf: 1.111 etc/rc.network: 1.98 etc/rc.network6: 1.20 lib/libipsec/ipsec_set_policy.3: 1.8 lib/libipsec/ipsec_strerror.3: 1.7 lib/libipsec/ipsec_strerror.c: 1.3 lib/libipsec/ipsec_strerror.h: 1.3 lib/libipsec/libpfkey.h: 1.2 lib/libipsec/pfkey.c: 1.3 lib/libipsec/pfkey_dump.c: 1.3 lib/libipsec/policy_token.l: 1.5 lib/libipsec/test-policy.c: 1.4 sbin/ifconfig/ifconfig.8: 1.42 sbin/ifconfig/ifconfig.c: 1.63 sbin/ping6/ping6.8: 1.10 sbin/ping6/ping6.c: 1.9 sbin/route/route.c: 1.48, 1.50 sbin/rtsol/Makefile: 1.4 share/doc/IPv6/IMPLEMENTATION: 1.3 share/examples/IPv6/USAGE: 1.3 share/man/man4/faith.4: 1.10 share/man/man4/gif.4: 1.9 share/man/man4/inet6.4: 1.8 share/man/man4/ip6.4: 1.8 share/man/man4/ipsec.4: 1.9 share/man/man4/kame.4: 1.8 share/man/man4/stf.4: 1.8 sys/conf/files: 1.534 sys/crypto/md5.c: 1.4 sys/crypto/sha1.c: 1.7 sys/crypto/blowfish/bf_enc.c: 1.4 sys/crypto/blowfish/bf_locl.h: 1.4 sys/crypto/blowfish/bf_skey.c: 1.4 sys/crypto/blowfish/blowfish.h: 1.4 sys/crypto/cast128/cast128.c: 1.4 sys/crypto/cast128/cast128.h: 1.4 sys/crypto/des/des.h: 1.4 sys/crypto/des/des_ecb.c: 1.4 sys/crypto/des/des_locl.h: 1.5 sys/crypto/des/des_setkey.c: 1.4 sys/crypto/rijndael/boxes-fst.dat: 1.2 sys/crypto/rijndael/rijndael-alg-fst.c: 1.2, 1.3 sys/crypto/rijndael/rijndael-alg-fst.h: 1.2 sys/crypto/rijndael/rijndael-api-fst.c: 1.2 sys/crypto/rijndael/rijndael-api-fst.h: 1.2 sys/crypto/rijndael/rijndael_local.h: 1.3 sys/kern/uipc_domain.c: 1.24 sys/kern/uipc_mbuf.c: 1.82 sys/kern/uipc_mbuf2.c: 1.8 sys/net/if.c: 1.109 sys/net/if_faith.c: 1.4, 1.5 sys/net/if_gif.c: 1.10 sys/net/if_gif.h: 1.4 sys/net/if_loop.c: 1.61 sys/net/if_sppp.h: 1.17 sys/net/if_spppsubr.c: 1.68, 1.69 sys/net/net_osdep.c: 1.4 sys/net/net_osdep.h: 1.5 sys/net/pfkeyv2.h: 1.6 sys/net/ppp_defs.h: 1.7 sys/net/rtsock.c: 1.52 sys/netinet/icmp6.h: 1.4 sys/netinet/in.c: 1.54 sys/netinet/in_gif.c: 1.10 sys/netinet/in_pcb.c: 1.84 sys/netinet/in_pcb.h: 1.38 sys/netinet/in_proto.c: 1.56 sys/netinet/ip6.h: 1.5 sys/netinet/ip_ecn.c: 1.4 sys/netinet/ip_ecn.h: 1.4 sys/netinet/ip_encap.c: 1.4 sys/netinet/ip_icmp.c: 1.57 sys/netinet/ip_input.c: 1.171 sys/netinet/ip_output.c: 1.126 sys/netinet/ip_var.h: 1.56 sys/netinet/raw_ip.c: 1.78 sys/netinet/tcp_input.c: 1.132 sys/netinet/tcp_output.c: 1.50 sys/netinet/tcp_subr.c: 1.103 sys/netinet/tcp_usrreq.c: 1.60 sys/netinet/udp_usrreq.c: 1.89 sys/netinet6/ah.h: 1.5 sys/netinet6/ah6.h: 1.4 sys/netinet6/ah_core.c: 1.8 sys/netinet6/ah_input.c: 1.7 sys/netinet6/ah_output.c: 1.7 sys/netinet6/dest6.c: 1.6 sys/netinet6/esp.h: 1.4 sys/netinet6/esp6.h: 1.4 sys/netinet6/esp_core.c: 1.5 sys/netinet6/esp_input.c: 1.7 sys/netinet6/esp_output.c: 1.5 sys/netinet6/frag6.c: 1.8 sys/netinet6/icmp6.c: 1.11 sys/netinet6/in6.c: 1.12 sys/netinet6/in6.h: 1.13 sys/netinet6/in6_cksum.c: 1.4 sys/netinet6/in6_gif.c: 1.5 sys/netinet6/in6_ifattach.c: 1.6 sys/netinet6/in6_ifattach.h: 1.3 sys/netinet6/in6_pcb.c: 1.15 sys/netinet6/in6_pcb.h: 1.4 sys/netinet6/in6_prefix.c: 1.7 sys/netinet6/in6_prefix.h: 1.5 sys/netinet6/in6_proto.c: 1.14 sys/netinet6/in6_rmx.c: 1.4 sys/netinet6/in6_src.c: 1.4 sys/netinet6/in6_var.h: 1.8 sys/netinet6/ip6_ecn.h: 1.4 sys/netinet6/ip6_forward.c: 1.11 sys/netinet6/ip6_fw.c: 1.11 sys/netinet6/ip6_fw.h: 1.11 sys/netinet6/ip6_input.c: 1.27 sys/netinet6/ip6_mroute.c: 1.7 sys/netinet6/ip6_mroute.h: 1.4 sys/netinet6/ip6_output.c: 1.25 sys/netinet6/ip6_var.h: 1.7 sys/netinet6/ip6protosw.h: 1.6 sys/netinet6/ipcomp.h: 1.2 sys/netinet6/ipcomp6.h: 1.2 sys/netinet6/ipcomp_core.c: 1.2 sys/netinet6/ipcomp_input.c: 1.2 sys/netinet6/ipcomp_output.c: 1.2 sys/netinet6/ipsec.c: 1.12 sys/netinet6/ipsec.h: 1.8 sys/netinet6/ipsec6.h: 1.5 sys/netinet6/mld6.c: 1.7 sys/netinet6/nd6.c: 1.9 sys/netinet6/nd6.h: 1.7 sys/netinet6/nd6_nbr.c: 1.9 sys/netinet6/nd6_rtr.c: 1.7, 1.8 sys/netinet6/raw_ip6.c: 1.11 sys/netinet6/route6.c: 1.4 sys/netinet6/scope6.c: 1.2 sys/netinet6/udp6_output.c: 1.3 sys/netinet6/udp6_usrreq.c: 1.15 sys/netkey/key.c: 1.25 sys/netkey/key.h: 1.7 sys/netkey/key_debug.c: 1.14 sys/netkey/key_debug.h: 1.7 sys/netkey/key_var.h: 1.4 sys/netkey/keydb.h: 1.6 sys/netkey/keysock.c: 1.6 sys/netsmb/smb_crypt.c: 1.2 sys/sys/mbuf.h: 1.79, 1.80 sys/sys/protosw.h: 1.33 sys/sys/socket.h: 1.54, 1.56 sys/sys/sockio.h: 1.17 usr.bin/netstat/inet.c: 1.42 usr.bin/netstat/inet6.c: 1.10 usr.bin/netstat/ipsec.c: 1.2 usr.bin/netstat/main.c: 1.40 usr.bin/netstat/mroute6.c: 1.5 usr.bin/netstat/netstat.1: 1.29 usr.bin/netstat/netstat.h: 1.21 usr.bin/netstat/route.c: 1.50, 1.51, 1.55 usr.sbin/faithd/Makefile: 1.6 usr.sbin/faithd/README: 1.4 usr.sbin/faithd/faithd.8: 1.9 usr.sbin/faithd/faithd.c: 1.7 usr.sbin/faithd/faithd.h: 1.3 usr.sbin/faithd/ftp.c: 1.5 usr.sbin/faithd/rsh.c: 1.5 usr.sbin/faithd/tcp.c: 1.3 usr.sbin/gifconfig/gifconfig.8: 1.6 usr.sbin/gifconfig/gifconfig.c: 1.4 usr.sbin/ifmcstat/ifmcstat.8: 1.3 usr.sbin/ifmcstat/ifmcstat.c: 1.7 usr.sbin/mld6query/mld6.c: 1.2 usr.sbin/mld6query/mld6query.8: 1.2 usr.sbin/ndp/ndp.8: 1.6 usr.sbin/ndp/ndp.c: 1.6 usr.sbin/prefix/Makefile: 1.4 usr.sbin/rip6query/rip6query.8: 1.4 usr.sbin/rip6query/rip6query.c: 1.5 usr.sbin/route6d/route6d.8: 1.6 usr.sbin/route6d/route6d.c: 1.9 usr.sbin/route6d/route6d.h: 1.3 usr.sbin/rrenumd/lexer.l: 1.3 usr.sbin/rrenumd/parser.y: 1.3 usr.sbin/rrenumd/rrenumd.8: 1.6 usr.sbin/rrenumd/rrenumd.c: 1.4 usr.sbin/rrenumd/rrenumd.conf.5: 1.10 usr.sbin/rrenumd/rrenumd.h: 1.3 usr.sbin/rtadvd/advcap.c: 1.4 usr.sbin/rtadvd/advcap.h: 1.4 usr.sbin/rtadvd/config.c: 1.7 usr.sbin/rtadvd/config.h: 1.4 usr.sbin/rtadvd/dump.c: 1.3 usr.sbin/rtadvd/dump.h: 1.3 usr.sbin/rtadvd/if.c: 1.6 usr.sbin/rtadvd/if.h: 1.4 usr.sbin/rtadvd/pathnames.h: 1.5 usr.sbin/rtadvd/rrenum.c: 1.5 usr.sbin/rtadvd/rrenum.h: 1.4 usr.sbin/rtadvd/rtadvd.8: 1.8 usr.sbin/rtadvd/rtadvd.c: 1.6 usr.sbin/rtadvd/rtadvd.conf.5: 1.6 usr.sbin/rtadvd/rtadvd.h: 1.4 usr.sbin/rtadvd/timer.c: 1.4 usr.sbin/rtadvd/timer.h: 1.4 usr.sbin/rtsold/Makefile: 1.6 usr.sbin/rtsold/dump.c: 1.4 usr.sbin/rtsold/if.c: 1.5 usr.sbin/rtsold/probe.c: 1.5 usr.sbin/rtsold/rtsol.c: 1.4 usr.sbin/rtsold/rtsold.8: 1.5 usr.sbin/rtsold/rtsold.c: 1.4 usr.sbin/rtsold/rtsold.h: 1.4 usr.sbin/setkey/parse.y: 1.3 usr.sbin/setkey/scriptdump.pl: 1.3 usr.sbin/setkey/setkey.8: 1.14 usr.sbin/setkey/setkey.c: 1.3 usr.sbin/setkey/token.l: 1.5 usr.sbin/traceroute6/traceroute6.8: 1.7 usr.sbin/traceroute6/traceroute6.c: 1.8
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Jun 23 03:21:46 2001 UTC (10 years, 7 months ago) by silby
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -13 lines
Eliminate the allocation of a tcp template structure for each connection. The information contained in a tcptemp can be reconstructed from a tcpcb when needed. Previously, tcp templates required the allocation of one mbuf per connection. On large systems, this change should free up a large number of mbufs. Reviewed by: bmilekic, jlemon, ru MFC after: 2 weeks
Revision 1.51.2.4: download - view: text, markup, annotated - select for diffs
Fri Jun 22 02:25:07 2001 UTC (10 years, 7 months ago) by silby
Branches: RELENG_4
Diff to: previous 1.51.2.3: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.3: +1 -10 lines
MFC: Removal of TCP_COMPAT_42 Approved by: wollman
Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Jun 11 19:34:19 2001 UTC (10 years, 8 months ago) by ume
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -1 lines
This is force commit to mention about previous commit. - supported the IPV6_V6ONLY socket option. - prohibit AF_INET6 sockets from sending IPv4 packet (using a mapped address) - prohibit AF_INET6 sockets from connecting to IPv4 hosts (using a mapped address)
Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Jun 11 12:39:01 2001 UTC (10 years, 8 months ago) by ume
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +9 -6 lines
Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.
TODO:
- The definitions of SADB_* in sys/net/pfkeyv2.h are still different
from RFC2407/IANA assignment because of binary compatibility
issue. It should be fixed under 5-CURRENT.
- ip6po_m member of struct ip6_pktopts is no longer used. But, it
is still there because of binary compatibility issue. It should
be removed under 5-CURRENT.
Reviewed by: itojun
Obtained from: KAME
MFC after: 3 weeks
Revision 1.40.2.4: download - view: text, markup, annotated - select for diffs
Wed May 2 20:48:34 2001 UTC (10 years, 9 months ago) by kris
Branches: RELENG_3
Diff to: previous 1.40.2.3: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.3: +7 -2 lines
MFC: Better TCP ISN randomization
Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Apr 20 11:58:56 2001 UTC (10 years, 9 months ago) by jesper
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -10 lines
Say goodbye to TCP_COMPAT_42 Reviewed by: wollman Requested by: wollman
Revision 1.51.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 18 17:55:24 2001 UTC (10 years, 9 months ago) by kris
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3
Diff to: previous 1.51.2.2: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.2: +11 -2 lines
MFC: Better TCP initial sequence number randomness from OpenBSD. Approved by: jkh
Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Apr 17 18:14:37 2001 UTC (10 years, 9 months ago) by kris
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -1 lines
Note that the previous commit also restored some historical behaviour in the TCP_COMPAT_42 case (e.g. choosing '1' as the initial sequence number at boot-time, instead of randomizing it). TCP_COMPAT_42 is the repository for old security holes, too :-)
Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Apr 17 18:08:01 2001 UTC (10 years, 9 months ago) by kris
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +11 -2 lines
Randomize the TCP initial sequence numbers more thoroughly. Obtained from: OpenBSD Reviewed by: jesper, peter, -developers
Revision 1.51.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 13 14:47:26 2001 UTC (10 years, 11 months ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.51.2.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.1: +18 -6 lines
MFC: r1.56; Unbreak LINT Approved by: jkh PR: 25651, 25758
Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Mar 12 02:57:42 2001 UTC (10 years, 11 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +18 -6 lines
Unbreak LINT. Pointed out by: phk
Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Fri Mar 9 16:41:20 2001 UTC (10 years, 11 months ago) by jlemon
Branches: RELENG_4
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +9 -1 lines
MFC: let protocol layer decide how to handle accept() on a disconnected socket.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Mar 9 08:16:40 2001 UTC (10 years, 11 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +9 -1 lines
Push the test for a disconnected socket when accept()ing down to the protocol layer. Not all protocols behave identically. This fixes the brokenness observed with unix-domain sockets (and postfix)
Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Feb 21 06:39:56 2001 UTC (10 years, 11 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +5 -2 lines
o Move per-process jail pointer (p->pr_prison) to inside of the subject credential structure, ucred (cr->cr_prison). o Allow jail inheritence to be a function of credential inheritence. o Abstract prison structure reference counting behind pr_hold() and pr_free(), invoked by the similarly named credential reference management functions, removing this code from per-ABI fork/exit code. o Modify various jail() functions to use struct ucred arguments instead of struct proc arguments. o Introduce jailed() function to determine if a credential is jailed, rather than directly checking pointers all over the place. o Convert PRISON_CHECK() macro to prison_check() function. o Move jail() function prototypes to jail.h. o Emulate the P_JAILED flag in fill_kinfo_proc() and no longer set the flag in the process flags field itself. o Eliminate that "const" qualifier from suser/p_can/etc to reflect mutex use. Notes: o Some further cleanup of the linux/jail code is still required. o It's now possible to consider resolving some of the process vs credential based permission checking confusion in the socket code. o Mutex protection of struct prison is still not present, and is required to protect the reference count plus some fields in the structure. Reviewed by: freebsd-arch Obtained from: TrustedBSD Project
Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Feb 2 18:48:25 2001 UTC (11 years ago) by jlemon
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +15 -5 lines
When turning off TCP_NOPUSH, call tcp_output to immediately flush out any data pending in the buffer. Submitted by: Tony Finch <dot@dotat.at>
Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Apr 1 22:35:45 2000 UTC (11 years, 10 months ago) by shin
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -5 lines
Support per socket based IPv4 mapped IPv6 addr enable/disable control. Submitted by: ume
Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jan 9 19:17:28 2000 UTC (12 years, 1 month ago) by shin
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +288 -2 lines
tcp updates to support IPv6. also a small patch to sys/nfs/nfs_socket.c, as max_hdr size change. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed Dec 22 19:13:24 1999 UTC (12 years, 1 month ago) by shin
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +13 -1 lines
IPSEC support in the kernel. pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Dec 13 00:39:20 1999 UTC (12 years, 2 months ago) by shin
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -4 lines
Always set INP_IPV4 flag for IPv4 pcb entries, because netstat needs it to print out protocol specific pcb info. A patch submitted by guido@gvr.org, and asmodai@wxs.nl also reported the problem. Thanks and sorry for your troubles. Submitted by: guido@gvr.org Reviewed by: shin
Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Dec 7 17:39:09 1999 UTC (12 years, 2 months ago) by shin
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +6 -2 lines
udp IPv6 support, IPv6/IPv4 tunneling support in kernel, packet divert at kernel for IPv6/IPv4 translater daemon This includes queue related patch submitted by jburkhol@home.com. Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Nov 18 08:28:24 1999 UTC (12 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -1 lines
Fix a warning and a potential panic if TCPDEBUG is active. (tp is a wild pointer and used by TCPDEBUG2())
Revision 1.15.2.6: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:35:02 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.15.2.5: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.5: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.26.2.5: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:18:46 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.26.2.4: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.2.4: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Aug 30 21:17:07 1999 UTC (12 years, 5 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -4 lines
Restructure TCP timeout handling:
- eliminate the fast/slow timeout lists for TCP and instead use a
callout entry for each timer.
- increase the TCP timer granularity to HZ
- implement "bad retransmit" recovery, as presented in
"On Estimating End-to-End Network Path Properties", by Allman and Paxson.
Submitted by: jlemon, wollmann
Revision 1.40.2.3: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:29:57 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.40.2.2: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.2: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:49:33 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.40.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 5 01:25:12 1999 UTC (12 years, 8 months ago) by peter
Branches: RELENG_3
Diff to: previous 1.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.1: +28 -7 lines
MFC: stop mbuf leak when writing to a tcp session in certain race conditions.
Revision 1.26.2.4: download - view: text, markup, annotated - select for diffs
Sat Jun 5 01:25:04 1999 UTC (12 years, 8 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.26.2.3: preferred, colored; branchpoint 1.26: preferred, colored
Changes since revision 1.26.2.3: +28 -7 lines
MFC: stop mbuf leak when writing to a tcp session in certain race conditions.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Jun 4 02:27:06 1999 UTC (12 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +28 -7 lines
Plug a mbuf leak in tcp_usr_send(). pru_send() routines are expected to either enqueue or free their mbuf chains, but tcp_usr_send() was dropping them on the floor if the tcpcb/inpcb has been torn down in the middle of a send/write attempt. This has been responsible for a wide variety of mbuf leak patterns, ranging from slow gradual leakage to rather rapid exhaustion. This has been a problem since before 2.2 was branched and appears to have been fixed in rev 1.16 and lost in 1.23/1.28. Thanks to Jayanth Vijayaraghavan <jayanth@yahoo-inc.com> for checking (extensively) into this on a live production 2.2.x system and that it was the actual cause of the leak and looks like it fixes it. The machine in question was loosing (from memory) about 150 mbufs per hour under load and a change similar to this stopped it. (Don't blame Jayanth for this patch though) An alternative approach to this would be to recheck SS_CANTSENDMORE etc inside the splnet() right before calling pru_send() after all the potential sleeps, interrupts and delays have happened. However, this would mean exposing knowledge of the tcp stack's reset handling and removal of the pcb to the generic code. There are other things that call pru_send() directly though. Problem originally noted by: John Plevyak <jplevyak@inktomi.com>
Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon May 3 23:57:32 1999 UTC (12 years, 9 months ago) by billf
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +5 -5 lines
Add sysctl descriptions to many SYSCTL_XXXs PR: kern/11197 Submitted by: Adrian Chadd <adrian@FreeBSD.org> Reviewed by: billf(spelling/style/minor nits) Looked at by: bde(style)
Revision 1.40.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 19:55:04 1999 UTC (12 years, 9 months ago) by ache
Branches: RELENG_3
CVS tags: RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -2 lines
MFC: linger time in seconds
Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Apr 28 11:37:50 1999 UTC (12 years, 9 months ago) by phk
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, POST_VFS_BIO_NFS_PATCH
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -1 lines
This Implements the mumbled about "Jail" feature. This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Apr 24 18:25:35 1999 UTC (12 years, 9 months ago) by ache
Branches: MAIN
CVS tags: PRE_SMP_VMSHARE, POST_SMP_VMSHARE
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -2 lines
so_linger is in seconds, not in 1/HZ PR: 11252 Submitted by: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Jan 20 17:31:59 1999 UTC (13 years ago) by fenner
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_1_0_RELEASE, PRE_NEWBUS, POST_NEWBUS
Branch point for: RELENG_3
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +7 -2 lines
Add a flag, passed to pru_send routines, PRUS_MORETOCOME. This flag means that there is more data to be put into the socket buffer. Use it in TCP to reduce the interaction between mbuf sizes and the Nagle algorithm. Based on: "Justin C. Walker" <justin@apple.com>'s description of Apple's fix for this problem.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Dec 7 21:58:42 1998 UTC (13 years, 2 months ago) by archie
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +1 -2 lines
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static and local variables, goto labels, and functions declared but not defined.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Aug 23 03:07:15 1998 UTC (13 years, 5 months ago) by wollman
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +59 -56 lines
Yow! Completely change the way socket options are handled, eliminating another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Jan 27 09:15:11 1998 UTC (14 years ago) by davidg
Branches: MAIN
CVS tags: PRE_SOFTUPDATE, PRE_NOBDEV, PRE_DEVFS_SLICE, POST_SOFTUPDATE, POST_DEVFS_SLICE
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
Improved connection establishment performance by doing local port lookups via
a hashed port list. In the new scheme, in_pcblookup() goes away and is
replaced by a new routine, in_pcblookup_local() for doing the local port
check. Note that this implementation is space inefficient in that the PCB
struct is now too large to fit into 128 bytes. I might deal with this in the
future by using the new zone allocator, but I wanted these changes to be
extensively tested in their current form first.
Also:
1) Fixed off-by-one errors in the port lookup loops in in_pcbbind().
2) Got rid of some unneeded rehashing. Adding a new routine, in_pcbinshash()
to do the initialial hash insertion.
3) Renamed in_pcblookuphash() to in_pcblookup_hash() for easier readability.
4) Added a new routine, in_pcbremlists() to remove the PCB from the various
hash lists.
5) Added/deleted comments where appropriate.
6) Removed unnecessary splnet() locking. In general, the PCB functions should
be called at splnet()...there are unfortunately a few exceptions, however.
7) Reorganized a few structs for better cache line behavior.
8) Killed my TCP_ACK_HACK kludge. It may come back in a different form in
the future, however.
These changes have been tested on wcarchive for more than a month. In tests
done here, connection establishment overhead is reduced by more than 50
times, thus getting rid of one of the major networking scalability problems.
Still to do: make tcp_fastimo/tcp_slowtimo scale well for systems with a
large number of connections. tcp_fastimo is easy; tcp_slowtimo is difficult.
WARNING: Anything that knows about inpcb and tcpcb structs will have to be
recompiled; at the very least, this includes netstat(1).
Revision 1.26.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 18 09:52:01 1997 UTC (14 years, 1 month ago) by davidg
Branches: RELENG_2_2
CVS tags: RELENG_2_2_8_RELEASE, RELENG_2_2_7_RELEASE, RELENG_2_2_6_RELEASE
Diff to: previous 1.26.2.2: preferred, colored; branchpoint 1.26: preferred, colored
Changes since revision 1.26.2.2: +3 -2 lines
MFC rev 1.36: splnet was not released in an error condition in tcp_usr_send().
Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Dec 18 09:50:38 1997 UTC (14 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -2 lines
Fixed a missing splx(s) bug in tcp_usr_send().
Revision 1.26.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 16 18:37:02 1997 UTC (14 years, 4 months ago) by joerg
Branches: RELENG_2_2
CVS tags: RELENG_2_2_5_RELEASE
Diff to: previous 1.26.2.1: preferred, colored; branchpoint 1.26: preferred, colored
Changes since revision 1.26.2.1: +3 -1 lines
MFC: make TCPDEBUG a new-style option
Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Sep 16 18:36:06 1997 UTC (14 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -1 lines
Make TCPDEBUG a new-style option.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Sep 14 03:10:40 1997 UTC (14 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Update network code to use poll support.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Aug 16 19:15:40 1997 UTC (14 years, 5 months ago) by wollman
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +14 -17 lines
Fix all areas of the system (or at least all those in LINT) to avoid storing socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Aug 2 14:32:58 1997 UTC (14 years, 6 months ago) by bde
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -6 lines
Removed unused #includes.
Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 19:54:11 1997 UTC (14 years, 7 months ago) by wollman
Branches: WOLLMAN_MBUF
Diff to: previous 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +14 -17 lines
Check in my big get-rid-of-sockaddrs-in-mbufs patch, on a private branch. Requested by: julian
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Apr 27 20:01:14 1997 UTC (14 years, 9 months ago) by wollman
Branches: MAIN
CVS tags: BP_WOLLMAN_MBUF
Branch point for: WOLLMAN_MBUF
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +25 -21 lines
The long-awaited mega-massive-network-code- cleanup. Part I. This commit includes the following changes: 1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility glue for them is deleted, and the kernel will panic on boot if any are compiled in. 2) Certain protocol entry points are modified to take a process structure, so they they can easily tell whether or not it is possible to sleep, and also to access credentials. 3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt() call. Protocols should use the process pointer they are now passed. 4) The PF_LOCAL and PF_ROUTE families have been updated to use the new style, as has the `raw' skeleton family. 5) PF_LOCAL sockets now obey the process's umask when creating a socket in the filesystem. As a result, LINT is now broken. I'm hoping that some enterprising hacker with a bit more time will either make the broken bits work (should be easy for netipx) or dike them out.
Revision 1.15.2.5: download - view: text, markup, annotated - select for diffs
Fri Feb 21 17:05:52 1997 UTC (14 years, 11 months ago) by wollman
Branches: RELENG_2_1_0
Diff to: previous 1.15.2.4: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.4: +14 -1 lines
Make the analogous fix to rev. 1.30. Note that this TCP probably has lots of other bugs still remaining, and it also still has the mondo switch statement from Hell.
Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Fri Feb 21 16:48:34 1997 UTC (14 years, 11 months ago) by wollman
Branches: RELENG_2_2
CVS tags: WHISTLE_SET_1, WHISTLE_NET_BRANCH_1, WHISTLE_BP1, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +14 -318 lines
Daring greatly, since everyone else seems to defer to him in these matters, ourt fearless network person dons his asbestos suit and commits a security/crash bug fix to the 2.2 release branch. This merge includes revs. 1.28 (delete mondo switch statement form Hell) and 1.30 (fix bug where ordinary users could panic the system)). Rev. 1.29 was not merged because of outside dependencies.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Feb 21 16:30:31 1997 UTC (14 years, 11 months ago) by wollman
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +14 -1 lines
Fix potential crash where a user attempts to perform an implied connect in TCP while sending urgent data. It is not clear what purpose is served by doing this, but there's no good reason why it shouldn't work. Submitted by: tjevans@raleigh.ibm.com via wpaul
Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Feb 18 20:46:33 1997 UTC (14 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -55 lines
Convert raw IP from mondo-switch-statement-from-Hell to pr_usrreqs. Collapse duplicates with udp_usrreq.c and tcp_usrreq.c (calling the generic routines in uipc_socket2.c and in_pcb.c). Calling sockaddr()_ or peeraddr() on a detached socket now traps, rather than harmlessly returning an error; this should never happen. Allow the raw IP buffer sizes to be controlled via sysctl.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Feb 14 18:15:51 1997 UTC (14 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +0 -317 lines
Fix the mechanism for choosing wehether to save the slow-start threshold in the route. This allows us to remove the unconditional setting of the pipesize in the route, which should mean that SO_SNDBUF and SO_RCVBUF should actually work again. While we're at it: - Convert udp_usrreq from `mondo switch statement from Hell' to new-style. - Delete old TCP mondo switch statement from Hell, which had previously been diked out.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:49:19 1997 UTC (15 years, 1 month ago) by jkh
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$ This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Oct 7 19:06:11 1996 UTC (15 years, 4 months ago) by davidg
Branches: MAIN
CVS tags: RELENG_2_2_BP
Branch point for: RELENG_2_2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
Improved in_pcblookuphash() to support wildcarding, and changed relavent callers of it to take advantage of this. This reduces new connection request overhead in the face of a large number of PCBs in the system. Thanks to David Filo <filo@yahoo.com> for suggesting this and providing a sample implementation (which wasn't used, but showed that it could be done). Reviewed by: wollman
Revision 1.15.2.4: download - view: text, markup, annotated - select for diffs
Thu Sep 19 08:18:40 1996 UTC (15 years, 4 months ago) by pst
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE
Diff to: previous 1.15.2.3: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.3: +5 -2 lines
Bring in the new sysctl variables and TCP timer patches from head
Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Sep 13 23:51:44 1996 UTC (15 years, 5 months ago) by pst
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
Make the misnamed tcp initial keepalive timer value (which is really the time, in seconds, that state for non-established TCP sessions stays about) a sysctl modifyable variable. [part 1 of two commits, I just realized I can't play with the indices as I was typing this commit message.]
Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Jul 12 17:28:47 1996 UTC (15 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
Fixed two bugs in previous commit: be sure to include tcp_debug.h when TCPDEBUG is defined, and fix typo in TCPDEBUG2() macro.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jul 11 16:32:38 1996 UTC (15 years, 7 months ago) by wollman
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +428 -1 lines
Modify the kernel to use the new pr_usrreqs interface rather than the old pr_usrreq mechanism which was poorly designed and error-prone. This commit renames pr_usrreq to pr_ousrreq so that old code which depended on it would break in an obvious manner. This commit also implements the new interface for TCP, although the old function is left as an example (#ifdef'ed out). This commit ALSO fixes a longstanding bug in the TCP timer processing (introduced by davidg on 1995/04/12) which caused timer processing on a TCB to always stop after a single timer had expired (because it misinterpreted the return value from tcp_usrreq() to indicate that the TCB had been deleted). Finally, some code related to polling has been deleted from if.c because it is not relevant t -current and doesn't look at all like my current code.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Mar 11 15:13:37 1996 UTC (15 years, 11 months ago) by davidg
Branches: MAIN
CVS tags: wollman_polling
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -1 lines
Move or add #include <queue.h> in preparation for upcoming struct socket changes.
Revision 1.15.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 31 11:02:03 1996 UTC (16 years ago) by davidg
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_5_RELEASE
Diff to: previous 1.15.2.2: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.2: +20 -1 lines
Brought in T/TCP fixes from main branch: retransmitted SYN segments could have different CC options.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Dec 6 23:37:42 1995 UTC (16 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -2 lines
Removed unnecessary #includes of vm stuff. Most of them were once prerequisites for <sys/sysctl.h>. subr_prof.c: Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Nov 14 20:34:47 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +11 -53 lines
New style sysctl & staticize alot of stuff.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Nov 9 20:23:09 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -2 lines
Start adding new style sysctl here too.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Nov 3 22:08:11 1995 UTC (16 years, 3 months ago) by olah
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +20 -1 lines
Fix a logical error in T/TCP: when we actively open a connection, we have to decide whether to send a CC or CCnew option in our SYN segment depending on the contents of our TAO cache. This decision has to be made once when the connection starts. The earlier code delayed this decision until the segment was assembled in tcp_output() and retransmitted SYN segments could have different CC options. Reviewed by: Richard Stevens, davidg, wollman
Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Fri Nov 3 07:53:59 1995 UTC (16 years, 3 months ago) by davidg
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_0_RELEASE
Diff to: previous 1.15.2.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.1: +6 -2 lines
Brought in fix from rev 1.17: start 2MSL timer for FIN_WAIT_2.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Oct 29 21:30:25 1995 UTC (16 years, 3 months ago) by olah
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +6 -2 lines
Start the 2MSL timer when the socket is closed and the TCP connection is in the FIN_WAIT_2 state in order to prevent the conn. hanging there forever. Reviewed by: davidg, olah Submitted by: Arne Henrik Juul <arnej@imf.unit.no> Obtained from: bugs@netbsd.org
Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Thu Sep 21 17:18:54 1995 UTC (16 years, 4 months ago) by wollman
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +16 -4 lines
Second try: get 4.4-Lite-2 into the source tree. The conflicts don't matter because none of our working source files are on the CSRG branch any more. Obtained from: 4.4BSD-Lite-2
Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 15 09:01:55 1995 UTC (16 years, 5 months ago) by davidg
Branches: RELENG_2_1_0
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +14 -2 lines
Brought in changes from rev 1.16: fix rare mbuf leak.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Sep 13 17:54:03 1995 UTC (16 years, 5 months ago) by wollman
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +14 -2 lines
Don't leak mbufs in an unusual error case in tcp_usrreq(). Reviewed by: Andras Olah <olah@freebsd.org> Obtained from: Lite-2
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Jun 11 19:31:43 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_1_0_BP
Branch point for: RELENG_2_1_0
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -1 lines
Merge RELENG_2_0_5 into HEAD
Revision 1.14.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 9 03:21:13 1995 UTC (16 years, 8 months ago) by davidg
Branches: RELENG_2_0_5
CVS tags: RELENG_2_0_5_RELEASE
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +3 -1 lines
Return error if in_pcbladdr() fails. Not doing so could result in a panic or unusual behavior under certain cicumstances. Submitted by: Matt Dillon
Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue May 30 08:10:00 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_0_5_BP
Branch point for: RELENG_2_0_5
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -4 lines
Remove trailing whitespace.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Apr 9 01:29:28 1995 UTC (16 years, 10 months ago) by davidg
Branches: MAIN
CVS tags: RELENG_2_0_5_ALPHA
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -4 lines
Implemented PCB hashing. Includes new functions in_pcbinshash, in_pcbrehash, and in_pcblookuphash.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Mar 16 18:15:06 1995 UTC (16 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -6 lines
Add and move declarations to fix all of the warnings from `gcc -Wimplicit' (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Feb 17 00:29:42 1995 UTC (16 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -1 lines
Include missing <sys/kernel.h> for `hz'. Submitted by: David Greenman, Rod Grimes, Christoph Kukulies
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Feb 16 01:42:45 1995 UTC (16 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
Correctly initialize so_linger in ticks (not seconds). Obtained from: Stevens, vol. 2, p. 1010
Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Feb 16 00:55:43 1995 UTC (16 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +0 -48 lines
Transaction TCP support now standard. Hack away!
Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Feb 16 00:27:44 1995 UTC (16 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +22 -9 lines
Add lots of useful MIB variables and a few not-so-useful ones for completeness.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Feb 9 23:13:27 1995 UTC (17 years ago) by wollman
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +199 -2 lines
Merge Transaction TCP, courtesy of Andras Olah <olah@cs.utwente.nl> and Bob Braden <braden@isi.edu>. NB: This has not had David's TCP ACK hack re-integrated. It is not clear what the correct solution to this problem is, if any. If a better solution doesn't pop up in response to this message, I'll put David's code back in (or he's welcome to do so himself).
Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 7 01:34:17 1995 UTC (17 years ago) by wollman
Branches: OLAH_TTCP
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +199 -2 lines
Andras Olah's port of Bob Braden's Transaction TCP code. This should be on a private branch until it gets merged back into the main line (which may take some time). Submitted by: Andras Olah <olah@cs.utwente.nl>
Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Dec 15 20:39:34 1994 UTC (17 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +22 -1 lines
Fix PR 59: don't allow TCP connections withmulticast addresses at either end.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Sep 15 10:36:56 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
CVS tags: RELEASE_2_0, BETA_2_0, ALPHA_2_0
Branch point for: OLAH_TTCP
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -1 lines
Made TCPDEBUG truely optional. Based on changes I made in FreeBSD 1.1.5. Fixed somebody's idea of a joke - about the first half of the lines in in_proto.c were spaced over by one space.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Aug 2 07:49:15 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -0 lines
Added $Id$
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun May 29 07:42:47 1994 UTC (17 years, 8 months ago) by davidg
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +12 -2 lines
Increased tcp_send/recvspace to 16k, and added TCP_SMALLSPACE ifdef to set it to 4k.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed May 25 09:11:56 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -1 lines
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch. Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 24 10:06:11 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, REL_before_johndavid_2_0_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Kernel Sources
Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 24 10:06:10 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision
