]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Convert IPDIVERT into a loadable module. This makes use of the dynamic loadability
authorandre <andre@FreeBSD.org>
Tue, 19 Oct 2004 21:14:57 +0000 (21:14 +0000)
committerandre <andre@FreeBSD.org>
Tue, 19 Oct 2004 21:14:57 +0000 (21:14 +0000)
commit9f43dad9fc6c03f7de0b8524d64fa3cdac16bd58
treecdb937a58e5fb1c4e6d3074c04eadefb30ae7251
parent40693cc7d92c8317aac4b7e774996bf54b3d79f9
Convert IPDIVERT into a loadable module.  This makes use of the dynamic loadability
of protocols.  The call to divert_packet() is done through a function pointer.  All
semantics of IPDIVERT remain intact.  If IPDIVERT is not loaded ipfw will refuse to
install divert rules and  natd will complain about 'protocol not supported'.  Once
it is loaded both will work and accept rules and open the divert socket.  The module
can only be unloaded if no divert sockets are open.  It does not close any divert
sockets when an unload is requested but will return EBUSY instead.
sys/modules/ipdivert/Makefile [new file with mode: 0644]
sys/netinet/in_proto.c
sys/netinet/ip_divert.c
sys/netinet/ip_divert.h
sys/netinet/ip_fw2.c
sys/netinet/ip_fw_pfil.c