aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/ipfw
Commit message (Collapse)AuthorAgeFilesLines
* Link pf 4.1 to the build:Max Laier2007-07-031-0/+1
| | | | | | | | | | | - move ftp-proxy from libexec to usr.sbin - add tftp-proxy - new altq mtag link Approved by: re (kensmith) Notes: svn path=/head/; revision=171173
* Introduce a new entry point, mac_create_mbuf_from_firewall. This entry pointChristian S.J. Peron2006-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | exists to allow the mandatory access control policy to properly initialize mbufs generated by the firewall. An example where this might happen is keep alive packets, or ICMP error packets in response to other packets. This takes care of kernel panics associated with un-initialize mbuf labels when the firewall generates packets. [1] I modified this patch from it's original version, the initial patch introduced a number of entry points which were programmatically equivalent. So I introduced only one. Instead, we should leverage mac_create_mbuf_netlayer() which is used for similar situations, an example being icmp_error() This will minimize the impact associated with the MFC Submitted by: mlaier [1] MFC after: 1 week This is a RELENG_6 candidate Notes: svn path=/head/; revision=162238
* Reimplementation of world/kernel build options. For details, see:Ruslan Ermilov2006-03-171-1/+3
| | | | | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine) Notes: svn path=/head/; revision=156813
* Let kmod.mk create empty opt_*.h files.Ruslan Ermilov2005-11-291-7/+1
| | | | Notes: svn path=/head/; revision=152930
* obey opt_inet6.h and opt_ipsec.h in kernel build directory.Hajimu UMEMOTO2005-11-291-0/+14
| | | | | | | Requested by: hrs Notes: svn path=/head/; revision=152928
* IPDIVERT is a module now and tell the other parts of the kernel about it.Andre Oppermann2004-10-251-4/+0
| | | | | | | IPDIVERT depends on IPFIREWALL being loaded or compiled into the kernel. Notes: svn path=/head/; revision=136953
* Document how a standalone module can be built with divert(4) support.Ruslan Ermilov2004-08-261-0/+4
| | | | Notes: svn path=/head/; revision=134347
* Revert the last change to sys/modules/ipfw/Makefile and fix aRuslan Ermilov2004-08-261-5/+1
| | | | | | | | | | standalone module build in a better way. Silence from: andre MFC after: 3 days Notes: svn path=/head/; revision=134346
* Make this compile again in the standalone and the MODULES_WITH_WORLDWarner Losh2004-08-231-1/+5
| | | | | | | | | environments. Chances are good that this doesn't produce a good module, but I leave the proper defaults to the dummy opt_* files to the author. Notes: svn path=/head/; revision=134190
* Convert ipfw to use PFIL_HOOKS. This is change is transparent to userlandAndre Oppermann2004-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and preserves the ipfw ABI. The ipfw core packet inspection and filtering functions have not been changed, only how ipfw is invoked is different. However there are many changes how ipfw is and its add-on's are handled: In general ipfw is now called through the PFIL_HOOKS and most associated magic, that was in ip_input() or ip_output() previously, is now done in ipfw_check_[in|out]() in the ipfw PFIL handler. IPDIVERT is entirely handled within the ipfw PFIL handlers. A packet to be diverted is checked if it is fragmented, if yes, ip_reass() gets in for reassembly. If not, or all fragments arrived and the packet is complete, divert_packet is called directly. For 'tee' no reassembly attempt is made and a copy of the packet is sent to the divert socket unmodified. The original packet continues its way through ip_input/output(). ipfw 'forward' is done via m_tag's. The ipfw PFIL handlers tag the packet with the new destination sockaddr_in. A check if the new destination is a local IP address is made and the m_flags are set appropriately. ip_input() and ip_output() have some more work to do here. For ip_input() the m_flags are checked and a packet for us is directly sent to the 'ours' section for further processing. Destination changes on the input path are only tagged and the 'srcrt' flag to ip_forward() is set to disable destination checks and ICMP replies at this stage. The tag is going to be handled on output. ip_output() again checks for m_flags and the 'ours' tag. If found, the packet will be dropped back to the IP netisr where it is going to be picked up by ip_input() again and the directly sent to the 'ours' section. When only the destination changes, the route's 'dst' is overwritten with the new destination from the forward m_tag. Then it jumps back at the route lookup again and skips the firewall check because it has been marked with M_SKIP_FIREWALL. ipfw 'forward' has to be compiled into the kernel with 'option IPFIREWALL_FORWARD' to enable it. DUMMYNET is entirely handled within the ipfw PFIL handlers. A packet for a dummynet pipe or queue is directly sent to dummynet_io(). Dummynet will then inject it back into ip_input/ip_output() after it has served its time. Dummynet packets are tagged and will continue from the next rule when they hit the ipfw PFIL handlers again after re-injection. BRIDGING and IPFW_ETHER are not changed yet and use ipfw_chk() directly as they did before. Later this will be changed to dedicated ETHER PFIL_HOOKS. More detailed changes to the code: conf/files Add netinet/ip_fw_pfil.c. conf/options Add IPFIREWALL_FORWARD option. modules/ipfw/Makefile Add ip_fw_pfil.c. net/bridge.c Disable PFIL_HOOKS if ipfw for bridging is active. Bridging ipfw is still directly invoked to handle layer2 headers and packets would get a double ipfw when run through PFIL_HOOKS as well. netinet/ip_divert.c Removed divert_clone() function. It is no longer used. netinet/ip_dummynet.[ch] Neither the route 'ro' nor the destination 'dst' need to be stored while in dummynet transit. Structure members and associated macros are removed. netinet/ip_fastfwd.c Removed all direct ipfw handling code and replace it with the new 'ipfw forward' handling code. netinet/ip_fw.h Removed 'ro' and 'dst' from struct ip_fw_args. netinet/ip_fw2.c (Re)moved some global variables and the module handling. netinet/ip_fw_pfil.c New file containing the ipfw PFIL handlers and module initialization. netinet/ip_input.c Removed all direct ipfw handling code and replace it with the new 'ipfw forward' handling code. ip_forward() does not longer require the 'next_hop' struct sockaddr_in argument. Disable early checks if 'srcrt' is set. netinet/ip_output.c Removed all direct ipfw handling code and replace it with the new 'ipfw forward' handling code. netinet/ip_var.h Add ip_reass() as general function. (Used from ipfw PFIL handlers for IPDIVERT.) netinet/raw_ip.c Directly check if ipfw and dummynet control pointers are active. netinet/tcp_input.c Rework the 'ipfw forward' to local code to work with the new way of forward tags. netinet/tcp_sack.c Remove include 'opt_ipfw.h' which is not needed here. sys/mbuf.h Remove m_claim_next() macro which was exclusively for ipfw 'forward' and is no longer needed. Approved by: re (scottl) Notes: svn path=/head/; revision=133920
* bring Makefile up to date with new ipfwJulian Elischer2002-06-281-1/+1
| | | | | | | Submitted by: luigi Notes: svn path=/head/; revision=98963
* Drop <bsd.man.mk> support from <bsd.kmod.mk>.Ruslan Ermilov2002-01-111-1/+0
| | | | | | | Not objected to by: -current Notes: svn path=/head/; revision=89260
* Use a consistent style and one much closer to the rest of /usr/srcDavid E. O'Brien2001-01-061-1/+3
| | | | Notes: svn path=/head/; revision=70711
* Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead ofPeter Wemm2000-05-271-1/+1
| | | | | | | encoding the relative path. Notes: svn path=/head/; revision=60966
* Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.Peter Wemm2000-05-041-1/+1
| | | | | | | | | | This means that the kernel can be totally self contained now and is not dependent on the last buildworld to update /usr/share/mk. This might also make it easier to build 5.x kernels on 4.0 boxes etc, assuming gensetdefs and config(8) are updated. Notes: svn path=/head/; revision=59951
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* No need to use a magic IPFIREWALL_MODULE - the build system suppliesPeter Wemm1999-04-201-2/+2
| | | | | | | one already we can test for. Notes: svn path=/head/; revision=45872
* Sample initial set of kld-ified modules. Not all have been completelyPeter Wemm1998-10-161-3/+3
| | | | | | | | | | converted yet. These are more of a starting point. This is NOT connected to the parent Makefile. OK'ed by jkh (who is ever so patiently waiting) Notes: svn path=/head/; revision=40440
* Add example for IPFIREWALL_DEFAULT_TO_ACCEPTPeter Wemm1997-09-101-1/+4
| | | | Notes: svn path=/head/; revision=29272
* Revert $FreeBSD$ back to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22982
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Use IPFIREWALL_MODULE instead of ACTUALLY_LKM_NOT_KERNEL to indicateBruce Evans1996-06-231-2/+3
| | | | | | | | | | | | | LKM'ness. ACTUALLY_LKM_NOT_KERNEL is supposed to be so ugly that it only gets used until <machine/conf.h> goes away. bsd.kmod.mk should define a better-named general macro for this. Some places use PSEUDO_LKM. This is another bad name. Makefile: Added IPFIREWALL_VERBOSE_LIMIT option (commented out). Notes: svn path=/head/; revision=16619
* Make the ipfw LKM work again.Poul-Henning Kamp1996-02-241-3/+3
| | | | | | | This concludes this round of updates to ipfw, have at it! Notes: svn path=/head/; revision=14234
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-2/+2
| | | | Notes: svn path=/head/; revision=8871
* Checking new lkm structure..Ugen J.S. Antsilevich1995-01-121-2/+2
| | | | Notes: svn path=/head/; revision=5544
* Firewall can be used as lkm module.To use itUgen J.S. Antsilevich1995-01-121-0/+13
firewall should *NOT* be compiled into kernel. Then it can be loaded.This is misc module but i'v got no problemms with it,so shouldn't you i suppose.. BTW this is very stupid to have one module in CVS for ALL lkm's... Notes: svn path=/head/; revision=5540