aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Revert MFC of r258821Peter Wemm2014-01-081-4/+2
| | | | Notes: svn path=/stable/4/; revision=260439
* MFC r258821 - fix tcp simultaneous closePeter Wemm2014-01-071-2/+4
| | | | | | | PR: kern/99188 Notes: svn path=/stable/4/; revision=260423
* MFC 1.209: Don't verify UDP IPv4 checksum in-place.David Malone2007-06-101-5/+6
| | | | Notes: svn path=/stable/4/; revision=170498
* MFC: 1.300 When we receive an out-of-window SYN for an "ESTABLISHED"David Malone2006-08-211-0/+2
| | | | | | | connection, ACK the SYN as required by RFC793. Notes: svn path=/stable/4/; revision=161504
* MFC 1.168: Never select the PCB that has INP_IPV6 flag and is boundHajimu UMEMOTO2006-02-111-1/+23
| | | | | | | | to :: if we have another PCB which is bound to 0.0.0.0. If a PCB has the INP_IPV6 flag, then we set its cost higher than IPv4 only PCBs. Notes: svn path=/stable/4/; revision=155533
* Fix a typo that caused a panic in a quite rare case: when a packet wasGleb Smirnoff2005-12-101-1/+1
| | | | | | | | | | | | | policy routed by ipfw(4) to local IP address, and the previous destination of the packet was reachable via an interface with checksum offloading capabilities. Not applicable to RELENG_5, RELENG_6 and HEAD. Submitted by: Mihail Balikov <misho interbgc.com> Notes: svn path=/stable/4/; revision=153292
* Correct bzip2 denial of service and permission race vulnerabilities.Simon L. B. Nielsen2005-06-292-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: Redhat, Steve Grubb via RedHat Security: CAN-2005-0953, CAN-2005-1260 Security: FreeBSD-SA-05:14.bzip2 Approved by: obrien Correct TCP connection stall denial-of-service vulnerabilities. MFC: rev 1.270 of tcp_input.c, rev 1.25 of tcp_seq.h by ps: When a TCP packets containing a timestamp is received, inadequate checking of sequence numbers is performed, allowing an attacker to artificially increase the internal "recent" timestamp for a connection. A TCP packets with the SYN flag set is accepted for established connections, allowing an attacker to overwrite certain TCP options. Security: CAN-2005-0356, CAN-2005-2068 Security: FreeBSD-SA-05:15.tcp Approved by: cperciva Notes: svn path=/stable/4/; revision=147669
* MFC: Fix two issues which were missed in FreeBSD-SA-05:08.kmem.Colin Percival2005-05-081-0/+2
| | | | | | | Reported by: Uwe Doering Notes: svn path=/stable/4/; revision=146004
* If we are going toColin Percival2005-05-063-0/+3
| | | | | | | | | | | | | 1. Copy a NULL-terminated string into a fixed-length buffer, and 2. copyout that buffer to userland, we really ought to 0. Zero the entire buffer first. Security: FreeBSD-SA-05:08.kmem Notes: svn path=/stable/4/; revision=145953
* MFC: 1.52: Time out routes created by redirect.Ruslan Ermilov2005-02-141-2/+4
| | | | Notes: svn path=/stable/4/; revision=141913
* MFC: 1.104 of tcp_usrreq.cDavid Malone2005-01-151-2/+6
| | | | | | | | when IN6P_AUTOFLOWLABEL is set, set the flowlabel on outgoing tcp connections. Notes: svn path=/stable/4/; revision=140301
* MFC of 1.61, 1.62 of tcp_syncache.c and 1.107 tcp_var.h.David Malone2005-01-152-6/+32
| | | | | | | | | | | | The tcp syncache code was leaving the IPv6 flowlabel uninitialised for the SYN|ACK packet and then letting in6_pcbconnect set the flowlabel later. Arange for the syncache/syncookie code to set and recall the flow label so that the flowlabel used for the SYN|ACK is consistent. This is done by using some of the cookie (when tcp cookies are enabeled) and by stashing the flowlabel in syncache. Notes: svn path=/stable/4/; revision=140300
* MFC revs 1.235 and 1.264;Mike Silbersack2005-01-051-0/+16
| | | | | | | | Improve the security of RST handling, and add a sysctl which can fall back to the old method. Notes: svn path=/stable/4/; revision=139706
* MFC of port randomization rate-based disabling:Mike Silbersack2005-01-024-4/+71
| | | | | | | | | | | | in_pcb.c rev 1.157 in_pcb.h rev 1.79 ip_input.c rev 1.293 ip_var.h rev 1.93 Approved by: re Notes: svn path=/stable/4/; revision=139561
* MFC rev 1.259; accept RSTs when our window is closed.Mike Silbersack2004-12-231-2/+3
| | | | Notes: svn path=/stable/4/; revision=139250
* Disable port randomization for now; it causes problems in some high speedMike Silbersack2004-12-121-1/+1
| | | | | | | | | | | | proxying applications. Modified methods of randomization which should solve this problem are being worked on, and will hopefully make it in before 4.11-release. This commit simply changes the default sysctl setting, it does not remove or change the randomization feature in any way. Notes: svn path=/stable/4/; revision=138719
* MFC:Gleb Smirnoff2004-12-111-1/+8
| | | | | | | | | Make route caching optional and disabled by default. Approved by: re (kensmith) Notes: svn path=/stable/4/; revision=138690
* Merge rev 1.104 from current:Jeffrey Hsu2004-12-111-1/+1
| | | | | | | | | | | date: 2004/08/03 02:01:44; author: hsu; state: Exp; lines: +1 -1 Fix bug with tracking the previous element in a list. Found by: edrt@citiz.net Submitted by: pavlin@icir.org Notes: svn path=/stable/4/; revision=138676
* MFC 1.110:Gleb Smirnoff2004-12-011-20/+2
| | | | | | | | | | | | - Since divert protocol is not connection oriented, remove SS_ISCONNECTED flag from divert sockets. - Remove div_disconnect() method, since it shouldn't be called now. - Remove div_abort() method. It was never called directly, since protocol doesn't have listen queue. It was called only from div_disconnect(), which is removed now. Notes: svn path=/stable/4/; revision=138265
* MFC r1.131:Bruce M Simpson2004-10-261-0/+1
| | | | | | | | | | | Check that rt_mask(rt) is non-NULL before dereferencing it, in the RTM_ADD case, thus avoiding a panic. PR: kern/42030 Submitted by: Iasen Kostov Notes: svn path=/stable/4/; revision=136974
* Fixed a kernel crash due to a duplicated free when net.inet[6].ip[6].rtexpire=0.SUZUKI Shinsuke2004-10-061-1/+7
| | | | | | | | | | | (this bug is specific to FreeBSD-4.x, so it's not committed to -CURRENT nor RELENG-5) Reported in: freebsd-net ("Weird memory exhaustion with FreeBSD 4.10-STABLE" starting from Sep 23, 2004) Obtained from: KAME Approved by: re (scottl) Notes: svn path=/stable/4/; revision=136182
* MFC rev.1.75: recover normal behavior: return EINVAL to attemptMaxim Konovalov2004-09-131-2/+5
| | | | | | | to add a divert rule when module is built without IPDIVERT. Notes: svn path=/stable/4/; revision=135137
* MFC: Fix some bugs in the code protecting from port theft.Yaroslav Tykhiy2004-08-281-10/+3
| | | | | | | | netinet/in_pcb.c 1.147, 1.152 netinet6/in6_pcb.c 1.54, 1.57 Notes: svn path=/stable/4/; revision=134435
* MFC 1.93: do not send icmp response if the original packet is encrypted.Hajimu UMEMOTO2004-08-131-0/+3
| | | | Notes: svn path=/stable/4/; revision=133656
* MFC: IPFW2 lookup tables.Ruslan Ermilov2004-06-164-0/+365
| | | | Notes: svn path=/stable/4/; revision=130571
* MFC rev. 1.218: fix buffer overrun in in_pcbopts().Maxim Konovalov2004-06-011-1/+1
| | | | Notes: svn path=/stable/4/; revision=129928
* MFC rev 1.143 - 1.146:Mike Silbersack2004-04-231-0/+11
| | | | | | | Randomize ephermal source ports. Notes: svn path=/stable/4/; revision=128594
* Don't skip the splx() call in *_usr_bind() and *_usr_connect() if theDon Lewis2004-04-231-8/+16
| | | | | | | | | | | | 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 Notes: svn path=/stable/4/; revision=128590
* Fixed a bug in previous revision: compute the payload checksum beforeRuslan Ermilov2004-04-071-8/+8
| | | | | | | | | | | | | | | | | we convert ip_len into a network byte order; in_delayed_cksum() still expects it in host byte order. The symtom was the ``in_cksum_skip: out of data by %d'' complaints from the kernel. To add to the previous commit log. These fixes make tcpdump(1) happy by not complaining about UDP/TCP checksum being bad for looped back IP multicast when multicast router is deactivated. Reported by: Vsevolod Lobko Notes: svn path=/stable/4/; revision=128003
* MFC of rev 1.50, fix refcount leak in verify_rev_path() function.Andre Oppermann2004-04-021-16/+13
| | | | | | | Reviewed by: sam Notes: svn path=/stable/4/; revision=127754
* MFC: 1.212: Rework multicast routing interaction with delayed checksums.Ruslan Ermilov2004-03-311-13/+3
| | | | Notes: svn path=/stable/4/; revision=127660
* MFC:Paul Saab2004-03-222-6/+6
| | | | | | | | | | | | 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 Notes: svn path=/stable/4/; revision=127321
* MFC in part tcp_input.c 1.228, tcp_subr.c 1.182, tcp_var.h 1.98:Jacques Vidrine2004-03-023-0/+46
| | | | | | | | | Limit TCP segment reassembly queue size. Submitted by: andre Notes: svn path=/stable/4/; revision=126495
* MFC 1.92 - Check that sa_len is the appropriate value in tcp_usr_bind(),Don Lewis2004-02-191-0/+8
| | | | | | | | | 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. Notes: svn path=/stable/4/; revision=125995
* MFC: Shorten the name of the socket option used to enable TCP-MD5 packetBruce M Simpson2004-02-162-3/+3
| | | | | | | | | treatment. Submitted by: Vincent Jardin Notes: svn path=/stable/4/; revision=125891
* MFC: Spell types consistently throughout this file. Do not use the __packedBruce M Simpson2004-02-161-4/+4
| | | | | | | | | | attribute, as we are often #include'd from userland without <sys/cdefs.h> in front of us, and it is not strictly necessary. Noticed by: Sascha Blank Notes: svn path=/stable/4/; revision=125871
* MFC: Import of TCP-MD5 (RFC2385) support.Bruce M Simpson2004-02-149-0/+274
| | | | | | | Sponsored by: sentex.net Notes: svn path=/stable/4/; revision=125828
* MFC: (whilespace-only)Maxim Sobolev2004-01-261-2/+2
| | | | | | | Kill trailing spaces. Notes: svn path=/stable/4/; revision=125022
* MFC rev. 1.51: include opt_ipsec.h so IPSEC/FAST_IPSEC is defined andMaxim Konovalov2004-01-221-0/+1
| | | | | | | the appropriate code is compiled in to support the O_IPSEC operator. Notes: svn path=/stable/4/; revision=124833
* MFC Version 1.128, don't use the cached inp->inp_route unlessDoug Ambrisko2004-01-021-5/+5
| | | | | | | | | | | it is marked as RTF_UP. This fixes a panic when an interface is detached (ie. suspend/resume). Not objected by: sam, iedowse Fix in -current by: iedowse Notes: svn path=/stable/4/; revision=124059
* MFC rev. 1.76: fix a comment.Maxim Konovalov2003-12-301-1/+1
| | | | Notes: svn path=/stable/4/; revision=123994
* MFC rev. 1.52: IN_MULTICAST wants an address in host byte order.Maxim Konovalov2003-12-231-1/+1
| | | | Notes: svn path=/stable/4/; revision=123762
* MFC: Introduce the STATICARP flag to -STABLE.Bruce M Simpson2003-12-081-1/+3
| | | | | | | | Submitted by: ru (rtsock.c) Sponsored by: Weyland-Yutani Corporation Notes: svn path=/stable/4/; revision=123299
* MFC Rev 1.40 to fix use-after-free problems with dynamic rules.Scott Long2003-10-171-4/+7
| | | | | | | | Submitted by: mckusick Approved by: re (murray> Notes: svn path=/stable/4/; revision=121154
* MFC 1.240: add IPSEC_FILTERGIF suport for FAST_IPSECSam Leffler2003-10-061-0/+7
| | | | | | | Approved by: re (murray) Notes: svn path=/stable/4/; revision=120860
* MFC: The knobs controlling ipfw2 and ip6fw were not protected when runningBruce M Simpson2003-10-011-3/+3
| | | | | | | | | | at an elevated securelevel. Fix this behaviour and function as documented. PR: kern/39396 Approved by: re (rwatson) Notes: svn path=/stable/4/; revision=120625
* Fix a logic error in the check to see if arplookup() should free the route.Bruce M Simpson2003-09-241-1/+1
| | | | | | | | Noticed by: Mike Hogsett Reviewed by: ru Notes: svn path=/stable/4/; revision=120420
* Fix a bug in arplookup(), whereby a hostile party on a locallyBruce M Simpson2003-09-231-6/+14
| | | | | | | | | | | attached network could exhaust kernel memory, and cause a system panic, by sending a flood of spoofed ARP requests. Approved by: security-officer, jake (mentor) Reported by: Apple Product Security <product-security@apple.com> Notes: svn path=/stable/4/; revision=120385
* MFC rev 1.115 (check for null return from M_PREPEND)Mike Silbersack2003-09-161-0/+2
| | | | | | | Approved by: re Notes: svn path=/stable/4/; revision=120112
* MFC mbuf_stress_test Mark II.Mike Silbersack2003-09-131-18/+2
| | | | | | | Approved by: re (murray) Notes: svn path=/stable/4/; revision=120021