Commit Graph

12 Commits

Author SHA1 Message Date
pgoyette 23d5409e7e Update the rest of the kernel to conform to the module subsystem's new
locking protocol.
2010-08-21 13:19:39 +00:00
christos 05cb23b544 call accept_filter_init int setopt so that don't use an uninitialized lock
from the setsockopt path.
2010-03-13 23:03:39 +00:00
pooka 8a9910b608 Can't use CTLFLAG_PERMANENT here without providing a rollback log,
since accept filters aren't (necessarily) added during kernel boot
phase.

pointed out & tested by Geoff Wing
2009-09-17 08:09:49 +00:00
pooka 11281f01a0 Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC & build tested i386/ALL
2009-09-16 15:23:04 +00:00
ad 8cd20f56b2 Autoload accept filter modules. 2008-11-20 10:00:54 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
ad b5ff001c46 Correction to previous. 2008-10-15 08:25:28 +00:00
ad 82e3c0b1ac Accept filters:
- Remove remaining #ifdef INET.
- Avoid holding locks so we don't need to do KM_NOSLEEP allocations.
- Use a rwlock to protect the accept filter list.
- Make it safe to unload accept filter modules.
- Minor KNF.
2008-10-14 13:45:26 +00:00
tls cef30423d3 Address problems with accept filters noted by ad in his source-changes
mail: http://mail-index.netbsd.org/source-changes/2008/10/10/msg211109.html

	* Scary-looking socket locking stubs (changed to KASSERT of locked)

	* depends on INET inappropriately (though now you must add new
	  accept filter names to the uipc_accf.c line in conf/files if
	  you aren't using dataready or httpready)

	* New code uses MALLOC/FREE -- changed to kmem_alloc/kmem_free;
	  could be pool_cache, these are all fixed-size allocations.

We need to verify that this works as expected with protocols with per-socket
locking, like PF_LOCAL.  I'm a little concerned about the case where the
lock on the listen socket isn't the same lock as on the eventual connected
socket.
2008-10-11 16:39:07 +00:00
pooka a709cdbf1f RCS Id polizei 2008-09-27 16:58:03 +00:00
plunky fd7356a917 Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core
2008-08-06 15:01:23 +00:00
tls 717f903a98 Add accept filters, ported from FreeBSD by Coyote Point Systems. Add inetd
support for specifying an accept filter for a service (mostly as a usage
example, but it can be handy for other things).  Manual pages to follow
in a day or so.

OK core@.
2008-08-04 03:55:47 +00:00