summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add a comment above the rfc1948 code that mentions the rfc so it's easy to findtedu2015-10-021-1/+4
|
* Kill yet another argument to functions in IPv6. This time ip6_output'sclaudio2015-09-111-2/+2
| | | | | | | ifpp - XXX: just for statistics ifpp is always NULL in all callers so that statistic confirms ifpp is dying OK mpi@
* Replace sockaddr casts with the proper satosin(), ... calls.bluhm2015-09-011-3/+2
| | | | From David Hill; OK mpi@; tested kspillner@; tweaks bluhm@
* The syn cache is completely implemented in tcp_input.c. So all itsbluhm2015-08-271-9/+1
| | | | | global variables should also live there. OK markus@
* Rename the syn cache counter into tcp_syn_cache_count to have thebluhm2015-08-241-9/+7
| | | | | | | | same prefix for all variables. Convert the counter type to int, the limit is also int. Before searching the cache, check that it is not empty. Do not access the counter outside of the syn cache from tcp_ctlinput(), let the syn_cache_lookup() function handle it. OK dlg@
* Expand ancient NTOHL/NTOHS/HTONS/HTONL macros.mpi2015-07-161-6/+6
| | | | ok guenther@, henning@
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-2/+2
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* test mbuf pointers against NULL not 0jsg2015-05-131-3/+3
| | | | ok krw@ miod@
* Include the timestamp TCP option in keep alive packets as well.mikeb2015-05-071-8/+17
| | | | | | | | | | According to RFC 7323 "once TSopt has been successfully negotiated, ... [it] MUST be sent in every non-<RST> segment for the duration of the connection." Which means that keep alives which are just ACK packets must include that too. Pointed out and tested by Lauri Tirkkonen <lotheac at iki ! fi>, thanks! ok mpi
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* unifdef INET in net code as a precursor to removing the pretend option.tedu2014-12-191-7/+1
| | | | | long live the one true internet. ok henning mikeb
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-2/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* remove now unnecessary casts from hash update calls.tedu2014-11-161-8/+8
|
* Let's just call a rdomain a rdomain.mpi2014-11-061-3/+3
| | | | ok dlg@
* mix the rtable into the hash for tcp sequence number generation.dlg2014-11-061-2/+3
| | | | ok tedu@ claudio@
* Remove "pl" suffix on pool names.mpi2014-11-041-6/+4
| | | | ok dlg@, uebayasi@, mikeb@
* use sha512 instead of md5 for tcp isn. ok deraadttedu2014-10-201-15/+20
|
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* Resize the pcb hashtable automatically. The table size will be doubledyasuoka2014-07-121-5/+4
| | | | | | when the number of the hash entries reaches 75% of the table size. ok dlg henning, 'commit in' claudio
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* ip_output() using varargs always struck me as bizarre, esp since it's onlyhenning2014-04-211-2/+2
| | | | | | ever used to pass on uint32 (for ipsec). stop that madness and just pass the uint32, 0 in all cases but the two that pass the ipsec flowinfo. ok deraadt reyk guenther
* we'll do fine without casting NULL to struct foo * / void *henning2014-04-211-3/+3
| | | | ok gcc & md5 (alas, no binary change)
* tcp_respond: let the stack worry about the cksum instead of doing ithenning2014-04-181-16/+3
| | | | manually, ok naddy (in january)
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-4/+4
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* Remove the number of in6_var.h inclusions by moving some functions andmpi2013-10-241-3/+1
| | | | | | global variables to in6.h. ok deraadt@
* Remove the number of in_var.h inclusions by moving some functions andmpi2013-10-231-2/+1
| | | | | | global variables to in.h. ok mikeb@, deraadt@
* Sprinkle a lot more IPv6 routing domains support in the kernel.phessler2013-10-211-11/+6
| | | | | | | | | Mostly mechanical, setting and passing the rdomain and rtable correctly. Not yet enabled. Lots of help and hints from claudio and bluhm OK claudio@, bluhm@
* Put a large chunk of the IPv6 rdomain support in-tree.phessler2013-10-201-5/+5
| | | | | | Still some important missing pieces, and this is not yet enabled. OK bluhm@
* make in_proto_cksum_out not rely on the pseudo header checksum to behenning2013-10-191-5/+2
| | | | | | | | | | already there, just compute it - it's dirt cheap. since that happens very late in ip_output, the rest of the stack doesn't have to care about checksums at all any more, if something needs to be checksummed, just set the flag on the pkthdr mbuf to indicate so. stop pre-computing the pseudo header checksum and incrementally updating it in the tcp and udp stacks. ok lteo florian
* Pass the routing domain to IPv6 pr_ctlinput() like in IPv4.bluhm2013-06-011-5/+2
| | | | OK claudio@
* The function rip6_ctlinput() claims that sa6_src is constant tobluhm2013-05-311-6/+6
| | | | | | | | | | allow the assingment of &sa6_any. But rip6_ctlinput() could not guarantee that as it casted away the const attribute when it passes the pointer to in6_pcbnotify(). Replace sockaddr with const sockaddr_in6 in the in6_pcbnotify() parameters. This reduces the number of casts. Also adjust in6_pcbhashlookup() to handle the const attribute correctly. Input and OK claudio@
* Remove various external variable declaration from sources files andmpi2013-04-101-6/+3
| | | | | | | move them to the corresponding header with an appropriate comment if necessary. ok guenther@
* Use macros sotoinpcb() and intotcpcb() instead of casts. Use NULLbluhm2013-04-021-4/+4
| | | | | instead of 0 for pointers. No binary change. OK mpi@
* code that calls timeout functions should include timeout.htedu2013-03-281-1/+2
| | | | | slipped by on i386, but the zaurus doesn't automagically pick it up. spotted by patrick
* no need for a lot of code to include proc.htedu2013-03-281-2/+1
|
* change the malloc(9) flags from M_DONTWAIT to M_NOWAIT; OK millert@gsoares2012-12-281-2/+2
|
* Increase TCP's initial window to 10 * MSS or 14600 bytes as proposed inclaudio2012-03-101-2/+2
| | | | | | draft-ietf-tcpm-initcwnd. net.inet.tcp.rfc3390 defaults to 2 now which uses the 10*MSS, setting it back to 1 brings back the old default of 4*MSS. OK sperreault@, henning@, sthen@, markus@
* for key material that is being being discarded, convert bzero() toderaadt2011-01-111-2/+2
| | | | | explicit_bzero() where required ok markus mikeb
* Fix the naming of interfaces and variables for rdomains and rtablesguenther2010-07-031-16/+7
| | | | | | | | | | | | and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
* Replace pool_get() + bzero() with pool_get(..., PR_ZERO).chl2010-01-151-3/+2
| | | | | | With input from oga@ and krw@ ok oga@ krw@ thib@ markus@ mk@
* Extend the protosw pr_ctlinput function to include the rdomain. This isclaudio2009-11-131-7/+15
| | | | | | | | needed so that the route and inp lookups done in TCP and UDP know where to look. Additionally in_pcbnotifyall() and tcp_respond() got a rdomain argument as well for similar reasons. With this tcp seems to be now fully rdomain save and no longer leaks single packets into the main domain. Looks good markus@, henning@
* rtables are stacked on rdomains (it is possible to have multiple routingclaudio2009-11-031-3/+2
| | | | | | | | | | | | | | tables on top of a rdomain) but until now our code was a crazy mix so that it was impossible to correctly use rtables in that case. Additionally pf(4) only knows about rtables and not about rdomains. This is especially bad when tracking (possibly conflicting) states in various domains. This diff fixes all or most of these issues. It adds a lookup function to get the rdomain id based on a rtable id. Makes pf understand rdomains and allows pf to move packets between rdomains (it is similar to NAT). Because pf states now track the rdomain id as well it is necessary to modify the pfsync wire format. So old and new systems will not sync up. A lot of help by dlg@, tested by sthen@, jsg@ and probably more OK dlg@, mpf@, deraadt@
* sockets created via a listening socket lose the rdomain and fail to workclaudio2009-08-101-3/+3
| | | | | | | therefore. Inherit the rdomain through the syncache. There are some interactions that need some more work (ctlinput) so this can be improved but is good enough for now. OK markus@
* Initial support for routing domains. This allows to bind interfaces toclaudio2009-06-051-4/+7
| | | | | | | | | alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
* rename arc4random_bytes => arc4random_buf to match libc's nicer name;djm2008-06-091-2/+2
| | | | ok deraadt@
* remove tcp_drain code since it's not longer used; ok henning, feedback thibmarkus2008-05-061-22/+1
|
* remove old unused TCP isn code; ok henning, dhartmei, mcbridemarkus2008-02-201-48/+1
|
* when creating a response, use the correct TCP header instead ofmarkus2008-02-201-64/+52
| | | | relying on the mbuf chain layout; with claudio@ and krw@; ok henning@
* TCP_COMPAT_42 was last used in 1997. Kill it.deraadt2007-11-271-5/+1
| | | | ok millert
* arc4random_bytes() is the preferred interface for generating nonces;djm2007-09-181-2/+2
| | | | "looks ok" markus@