summaryrefslogtreecommitdiffstats
path: root/sys/net/raw_usrreq.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove raw_usrreq and raw_cb, nothing is using them anymore.claudio2018-07-101-161/+0
| | | | OK mpi@
* Push NET_LOCK down in the default ifioctl case.pirofti2018-04-241-3/+4
| | | | | | | For the PRU_CONTROL bit the NET_LOCK surrounds in[6]_control() and on the ENOTSUPP case we guard the driver if_ioctl functions. OK mpi@
* There is no way SS_NOFDREF is set on a raw socket in raw_usrreq forflorian2017-11-031-4/+1
| | | | | | | | | | | PRU_DISCONNECT or PRU_ABORT. So raw_disconnect() and sofree() return immediately so remove the dead code. Also the following call to soisdisconnected() would be a use after free. This removes the last calls to raw_disconnect() so tedu it.
* Move PRU_DETACH out of pr_usrreq into per proto pr_detachflorian2017-11-021-9/+1
| | | | | | functions to pave way for more fine grained locking. Suggested by, comments & OK mpi
* Both PF_ROUTE and PF_KEY need to start to take care of their own PCB listclaudio2017-07-031-15/+2
| | | | | | | to simplify the locking of those lists. For now move the LIST_ENTRY from rawcb into routecb and in the pfkey case a new keycb. Do some cleanup and renaming in the pfkey code but more to come. OK bluhm@ mpi@
* Move PRU_ATTACH out of the pr_usrreq functions into pr_attach.claudio2017-03-131-15/+1
| | | | | | | Attach is quite a different thing to the other PRU functions and this should make locking a bit simpler. This also removes the ugly hack on how proto was passed to the attach function. OK bluhm@ and mpi@ on a previous version
* Do not grab the NET_LOCK() for routing sockets operations.mpi2017-03-071-2/+2
| | | | | | | | The only function that need the lock is rtm_output() as it messes with the routing table. So grab the lock there since it is safe to sleep in a process context. ok bluhm@
* Convert the variable argument list of the pr_output functions tobluhm2017-03-031-2/+2
| | | | | fixed parameters. OK mpi@ claudio@ dhill@
* The function raw_input() has not been called since netiso has beenbluhm2017-01-231-77/+1
| | | | | | | | | removed in 2004. The comment about raw_input() above rip_input() was added in 1981, but it is wrong since 1992. After that it has been copied to rip6_input(). (*pr_input)() is never called with the parameters (mbuf, sockproto, sockaddr, sockaddr). So retire raw_input(). OK guenther@ deraadt@
* Introduce the NET_LOCK() a rwlock used to serialize accesses to the partsmpi2016-12-191-2/+2
| | | | | | | | | | | of the network stack that are not yet ready to be executed in parallel or where new sleeping points are not possible. This first pass replace all the entry points leading to ip_output(). This is done to not introduce new sleeping points when trying to acquire ART's write lock, needed when a new L2 entry is created via the RT_RESOLVE. Inputs from and ok bluhm@, ok dlg@
* Enforce that pr_usrreq functions are called at IPL_SOFTNET.mpi2016-11-211-6/+4
| | | | | | | This will allow us to keep locking simple as soon as we trade splsoftnet() for a rwlock. ok bluhm@, claudio@
* Instead of setting errno and then doing a goto do a m_freem() and return error.claudio2016-10-081-6/+5
| | | | Same thing but nicer to read. OK henning@
* Remove code that was never enabled, it will not happen.claudio2016-09-051-27/+1
|
* Kill raw_ctlinput() this function is INCOMPLETE since rev 1.1 and is notclaudio2016-09-051-11/+1
| | | | | needed. All callers using the protosw pr_ctlinput pointer do a NULL check before so there is no need to provide the function.
* remove old lint annotationstedu2015-12-051-3/+1
|
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-151-3/+2
| | | | ok stsp mpi
* Get rid of the undocumented & temporary* m_copy() macro added formpi2015-06-301-2/+2
| | | | | | | | compatibility with 4.3BSD in September 1989. *Pick your own definition for "temporary". ok bluhm@, claudio@, dlg@
* test mbuf pointers against NULL not 0jsg2015-05-131-3/+3
| | | | ok krw@ miod@
* 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@
* remove uneeded route.h includesjsg2014-09-081-2/+1
| | | | ok miod@ mpi@
* Rearrange the code a bit to prevent splx() from being called with anmikeb2012-12-121-3/+3
| | | | uninitialized variable. Found by Owain G. Ainsworth, ok guenther
* remove incorrect splnet usage in pfkey interfacemikeb2012-11-271-2/+6
| | | | | and make raw_usrreq do an splsoftnet on its own; joint work with david hill, ok claudio
* Ansify raw_... function definitions. No binary change.bluhm2012-01-111-12/+5
| | | | from Michael W. Bombardieri; ok henning@
* Don't attempt to enqueue mbufs on sockets marked as SS_CANTRCVMORE, asblambert2011-04-031-1/+3
| | | | | | was done earlier for routing sockets. ok claudio@
* Extend the protosw pr_ctlinput function to include the rdomain. This isclaudio2009-11-131-2/+3
| | | | | | | | 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@
* Deal with the situation when TCP nfs mounts timeout and processesthib2008-05-231-2/+3
| | | | | | | | | | | | | get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect. OK markus@, blambert@. "go ahead" deraadt@. Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
* put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosespie2004-01-031-2/+2
| | | | | | | to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
* de-register. deraadt okitojun2003-12-101-7/+7
|
* Correct off-by-ones with respect to PRC_NCMDS. Mostly from FreeBSD.cloder2003-09-281-2/+2
| | | | OK krw@, deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* KNF - return is not a function.itojun2002-09-111-2/+2
|
* Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsmillert2002-03-151-7/+1
| | | | the ANSI way.
* Use queue.h macros.jason2001-12-111-2/+2
|
* avoid panic; garath@code.ridgefield.orgderaadt1998-09-171-2/+4
|
* From NetBSD: 960217 mergeniklas1996-03-031-8/+25
|
* initial import of NetBSD treederaadt1995-10-181-0/+308