1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1995-01-12 13:03:02 +00:00
|
|
|
|
2017-03-04 10:10:17 +00:00
|
|
|
.PATH: ${SRCTOP}/sys/netpfil/ipfw
|
2001-01-06 14:00:42 +00:00
|
|
|
|
1998-10-16 04:30:52 +00:00
|
|
|
KMOD= ipfw
|
2016-08-13 15:41:04 +00:00
|
|
|
SRCS= ip_fw2.c ip_fw_pfil.c ip_fw_bpf.c
|
2016-04-14 22:51:23 +00:00
|
|
|
SRCS+= ip_fw_dynamic.c ip_fw_log.c ip_fw_eaction.c
|
2014-07-28 19:01:25 +00:00
|
|
|
SRCS+= ip_fw_sockopt.c ip_fw_table.c ip_fw_table_algo.c ip_fw_iface.c
|
Add support for multi-field values inside ipfw tables.
This is the last major change in given branch.
Kernel changes:
* Use 64-bytes structures to hold multi-value variables.
* Use shared array to hold values from all tables (assume
each table algo is capable of holding 32-byte variables).
* Add some placeholders to support per-table value arrays in future.
* Use simple eventhandler-style API to ease the process of adding new
table items. Currently table addition may required multiple UH drops/
acquires which is quite tricky due to atomic table modificatio/swap
support, shared array resize, etc. Deal with it by calling special
notifier capable of rolling back state before actually performing
swap/resize operations. Original operation then restarts itself after
acquiring UH lock.
* Bump all objhash users default values to at least 64
* Fix custom hashing inside objhash.
Userland changes:
* Add support for dumping shared value array via "vlist" internal cmd.
* Some small print/fill_flags dixes to support u32 values.
* valtype is now bitmask of
<skipto|pipe|fib|nat|dscp|tag|divert|netgraph|limit|ipv4|ipv6>.
New values can hold distinct values for each of this types.
* Provide special "legacy" type which assumes all values are the same.
* More helpers/docs following..
Some examples:
3:41 [1] zfscurr0# ipfw table mimimi create valtype skipto,limit,ipv4,ipv6
3:41 [1] zfscurr0# ipfw table mimimi info
+++ table(mimimi), set(0) +++
kindex: 2, type: addr
references: 0, valtype: skipto,limit,ipv4,ipv6
algorithm: addr:radix
items: 0, size: 296
3:42 [1] zfscurr0# ipfw table mimimi add 10.0.0.5 3000,10,10.0.0.1,2a02:978:2::1
added: 10.0.0.5/32 3000,10,10.0.0.1,2a02:978:2::1
3:42 [1] zfscurr0# ipfw table mimimi list
+++ table(mimimi), set(0) +++
10.0.0.5/32 3000,0,10.0.0.1,2a02:978:2::1
2014-08-31 23:51:09 +00:00
|
|
|
SRCS+= ip_fw_table_value.c
|
2017-11-17 22:40:02 +00:00
|
|
|
SRCS+= opt_inet.h opt_inet6.h opt_ipdivert.h opt_ipfw.h
|
2001-01-06 14:00:42 +00:00
|
|
|
|
1999-04-20 14:31:23 +00:00
|
|
|
CFLAGS+= -DIPFIREWALL
|
1995-01-12 13:03:02 +00:00
|
|
|
#
|
1995-01-12 13:57:51 +00:00
|
|
|
#If you want it verbose
|
1995-01-12 13:03:02 +00:00
|
|
|
#CFLAGS+= -DIPFIREWALL_VERBOSE
|
1996-06-23 14:28:02 +00:00
|
|
|
#CFLAGS+= -DIPFIREWALL_VERBOSE_LIMIT=100
|
1995-01-12 13:03:02 +00:00
|
|
|
#
|
1997-09-10 04:19:07 +00:00
|
|
|
#If you want it to pass all packets by default
|
|
|
|
#CFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT
|
|
|
|
#
|
1995-01-12 13:03:02 +00:00
|
|
|
|
2000-05-27 01:14:33 +00:00
|
|
|
.include <bsd.kmod.mk>
|