summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
AgeCommit message (Collapse)Author
1999-10-14Fix for PR 871.cmetz
This fix is taken from BSD/OS (the file in question being BSD licensed). It continues to remove a datagram from a socket receive buffer even if there is an error on the copy-out, so as to leave the buffer in a reasonable state. Before, the kernel would stop in mid-receive if the copy-out failed, and the buffer's structural requirements would be violated (since the start of a datagram must be an address iff ). Note that if the user provides any invalid addresses as arguments to a recvmsg(), the datagram at the front of the buffer will be discarded. The more correct behavior would be not to remove this datagram if the arguments are invalid. Implementing this behavior requires a lot of significant changes, and socket receives are a critical path. Also included are two simple and fairly obvious fixes from the same source. If non-blocking I/O is set, it makes sure the receieve is non-blocking. It also fixes a slightly over-aggressive optimization.
1999-02-19fixed patch for accept/select race; mycroft@netbsd.orgTodd C. Miller
1999-02-18undo select/accept patch, which causes full listen queues apparentlyTheo de Raadt
1999-02-05support MSG_BCAST and MSG_MCASTTheo de Raadt
1999-01-21Fixes select(2)/accept(2) race condition which permits DoS; mycroft@netbsd.orgTodd C. Miller
1998-07-28Return EINVAL when msg_iovlen or iovcnt <= 0; Make uio_resid unsigned ↵Todd C. Miller
(size_t) and don't return EINVAL if it is < 0 in sys_{read,write}. Remove check for uio_resid < 0 uiomove() now that uio_resid is unsigned and brack remaining panics with #ifdef DIAGNOSTIC. vn_rdwr() must now take a size_t * as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more
1998-02-14add seperate so_euid & so_ruid to struct socket, so that identd is still ↵Theo de Raadt
fast.. Sigh. I will change this again later
1998-01-06so_linger is in secondsTheo de Raadt
1997-11-15for shutdown(2), if "how" is not 0-2, return EINVALTheo de Raadt
1997-11-11MSG_EOR on SOCK_STREAM is invalid; wollmanTheo de Raadt
1997-08-31for non-tty TIOCSPGRP/F_SETOWN/FIOSETOWN pgid setting calls, store uidTheo de Raadt
and euid as well, then deliver them using new csignal() interface which ensures that pgid setting process is permitted to signal the pgid process(es). Thanks to newsham@aloha.net for extensive help and discussion.
1997-08-31mbuf leak repair; mycroft@netbsdTheo de Raadt
1997-06-29constrain lowwater >= highwaterTheo de Raadt
1997-06-23oopsTheo de Raadt
1997-06-23for SO_SND*/SO_RCV*, clip low-end of parameter to 1Theo de Raadt
1997-06-06SO_SNDTIMEO tv_usec calc error; stevens, vol2, p548Theo de Raadt
1997-02-28Moved IPsec socket state to the PCB.Angelos D. Keromytis
1997-02-28New variables for system-wide security default levels.Angelos D. Keromytis
1997-02-28IPsec socket API additions.Angelos D. Keromytis
1996-12-16uiomove not checked for failure; wpaul@skynet.ctr.columbia.eduTheo de Raadt
1996-09-20`solve' the syn bomb problem as well as currently known; add sysctl's forTheo de Raadt
SOMAXCONN (kern.somaxconn), SOMINCONN (kern.sominconn), and TCPTV_KEEP_INIT (net.inet.tcp.keepinittime). when this is not enough (ie. overfull), start doing tail drop, but slightly prefer the same port.
1996-08-24change to so_uid, also fix a missing credential found by dmTheo de Raadt
1996-08-14incorrect size calculation in mbuf copying, netbsd pr#2692; fix from ↵Theo de Raadt
explorer@flame.org
1996-08-05struct socket gets so_ucred; permit only same uid or root to do port takeover.Theo de Raadt
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1996-03-03from NetBSD: so it compiles now again ;)Michael Shalayeff
1995-10-18initial import of NetBSD treeTheo de Raadt