|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
83271c68 |
| 07-Nov-2021 |
Konstantin Belousov <[email protected]> |
Fix some modules to export more used symbols
(cherry picked from commit 5bb3134a8c21cb87b30e135ef168483f0333dabb)
|
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
| #
b99a6823 |
| 07-Feb-2018 |
Andrey V. Elsukov <[email protected]> |
Rework ipfw dynamic states implementation to be lockless on fast path.
o added struct ipfw_dyn_info that keeps all needed for ipfw_chk and for dynamic states implementation information; o added DY
Rework ipfw dynamic states implementation to be lockless on fast path.
o added struct ipfw_dyn_info that keeps all needed for ipfw_chk and for dynamic states implementation information; o added DYN_LOOKUP_NEEDED() macro that can be used to determine the need of new lookup of dynamic states; o ipfw_dyn_rule now becomes obsolete. Currently it used to pass information from kernel to userland only. o IPv4 and IPv6 states now described by different structures dyn_ipv4_state and dyn_ipv6_state; o IPv6 scope zones support is added; o ipfw(4) now depends from Concurrency Kit; o states are linked with "entry" field using CK_SLIST. This allows lockless lookup and protected by mutex modifications. o the "expired" SLIST field is used for states expiring. o struct dyn_data is used to keep generic information for both IPv4 and IPv6; o struct dyn_parent is used to keep O_LIMIT_PARENT information; o IPv4 and IPv6 states are stored in different hash tables; o O_LIMIT_PARENT states now are kept separately from O_LIMIT and O_KEEP_STATE states; o per-cpu dyn_hp pointers are used to implement hazard pointers and they prevent freeing states that are locklessly used by lookup threads; o mutexes to protect modification of lists in hash tables now kept in separate arrays. 65535 limit to maximum number of hash buckets now removed. o Separate lookup and install functions added for IPv4 and IPv6 states and for parent states. o By default now is used Jenkinks hash function.
Obtained from: Yandex LLC MFC after: 42 days Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D12685
show more ...
|
| #
e11f0a0c |
| 17-Nov-2017 |
Andrey V. Elsukov <[email protected]> |
Unconditionally enable support for O_IPSEC opcode.
IPsec support can be loaded as kernel module, thus do not depend from kernel option IPSEC and always build O_IPSEC opcode implementation as enabled
Unconditionally enable support for O_IPSEC opcode.
IPsec support can be loaded as kernel module, thus do not depend from kernel option IPSEC and always build O_IPSEC opcode implementation as enabled.
Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
193d9e76 |
| 04-Mar-2017 |
Enji Cooper <[email protected]> |
sys/modules: normalize .CURDIR-relative paths to SRCTOP
This simplifies make output/logic
Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
56132dcc |
| 13-Aug-2016 |
Andrey V. Elsukov <[email protected]> |
Move logging via BPF support into separate file.
* make interface cloner VNET-aware; * simplify cloner code and use if_clone_simple(); * migrate LOGIF_LOCK() to rmlock; * add ipfw_bpf_mtap2() functi
Move logging via BPF support into separate file.
* make interface cloner VNET-aware; * simplify cloner code and use if_clone_simple(); * migrate LOGIF_LOCK() to rmlock; * add ipfw_bpf_mtap2() function to pass mbuf to BPF; * introduce new additional ipfwlog0 pseudo interface. It differs from ipfw0 by DLT type used in bpfattach. This interface is intended to used by ipfw modules to dump packets with additional info attached. Currently pflog format is used. ipfw_bpf_mtap2() function uses second argument to determine which interface use for dumping. If dlen is equal to ETHER_HDR_LEN it uses old ipfw0 interface, if dlen is equal to PFLOG_HDRLEN - ipfwlog0 will be used.
Obtained from: Yandex LLC Sponsored by: Yandex LLC
show more ...
|
| #
2acdf79f |
| 14-Apr-2016 |
Andrey V. Elsukov <[email protected]> |
Add External Actions KPI to ipfw(9).
It allows implementing loadable kernel modules with new actions and without needing to modify kernel headers and ipfw(8). The module registers its action handler
Add External Actions KPI to ipfw(9).
It allows implementing loadable kernel modules with new actions and without needing to modify kernel headers and ipfw(8). The module registers its action handler and keyword string, that will be used as action name. Using generic syntax user can add rules with this action. Also ipfw(8) can be easily modified to extend basic syntax for external actions, that become a part base system. Sample modules will coming soon.
Obtained from: Yandex LLC Sponsored by: Yandex LLC
show more ...
|
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0 |
|
| #
b1d105bc |
| 21-Sep-2014 |
Alexander V. Chernikov <[email protected]> |
Add pre-alfa version of DXR lookup module. It does build but (currently) does not work.
This change is not intended to be merged along with other ipfw changes.
|
| #
0cba2b28 |
| 31-Aug-2014 |
Alexander V. Chernikov <[email protected]> |
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 h
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
show more ...
|
| #
aeaed508 |
| 04-Aug-2014 |
Warner Losh <[email protected]> |
Move most of the 15 variations on generating opt_inet.h and opt_inet6.h into kmod.mk by forcing almost everybody to eat the same dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h targe
Move most of the 15 variations on generating opt_inet.h and opt_inet6.h into kmod.mk by forcing almost everybody to eat the same dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h targets here too.
show more ...
|
| #
68394ec8 |
| 28-Jul-2014 |
Alexander V. Chernikov <[email protected]> |
* Add generic ipfw interface tracking API * Rewrite interface tables to use interface indexes
Kernel changes: * Add generic interface tracking API: - ipfw_iface_ref (must call unlocked, performs la
* Add generic ipfw interface tracking API * Rewrite interface tables to use interface indexes
Kernel changes: * Add generic interface tracking API: - ipfw_iface_ref (must call unlocked, performs lazy init if needed, allocates state & bumps ref) - ipfw_iface_add_ntfy(UH_WLOCK+WLOCK, links comsumer & runs its callback to update ifindex) - ipfw_iface_del_ntfy(UH_WLOCK+WLOCK, unlinks consumer) - ipfw_iface_unref(unlocked, drops reference) Additionally, consumer callbacks are called in interface withdrawal/departure.
* Rewrite interface tables to use iface tracking API. Currently tables are implemented the following way: runtime data is stored as sorted array of {ifidx, val} for existing interfaces full data is stored inside namedobj instance (chained hashed table).
* Add IP_FW_XIFLIST opcode to dump status of tracked interfaces
* Pass @chain ptr to most non-locked algorithm callbacks: (prepare_add, prepare_del, flush_entry ..). This may be needed for better interaction of given algorithm an other ipfw subsystems
* Add optional "change_ti" algorithm handler to permit updating of cached table_info pointer (happens in case of table_max resize)
* Fix small bug in ipfw_list_tables() * Add badd (insert into sorted array) and bdel (remove from sorted array) funcs
Userland changes: * Add "iflist" cmd to print status of currently tracked interface * Add stringnum_cmp for better interface/table names sorting
show more ...
|
|
Revision tags: release/9.3.0 |
|
| #
409fd736 |
| 14-Jun-2014 |
Alexander V. Chernikov <[email protected]> |
Add ip_fw_algo.c to ipfw Makefile.
|
| #
c6063d0d |
| 06-May-2014 |
Warner Losh <[email protected]> |
Use src.opts.mk in preference to bsd.own.mk except where we need stuff from the latter.
|
|
Revision tags: release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0 |
|
| #
3b3a8eb9 |
| 14-Sep-2012 |
Gleb Smirnoff <[email protected]> |
o Create directory sys/netpfil, where all packet filters should reside, and move there ipfw(4) and pf(4).
o Move most modified parts of pf out of contrib.
Actual movements:
sys/contrib/pf/net/*.
o Create directory sys/netpfil, where all packet filters should reside, and move there ipfw(4) and pf(4).
o Move most modified parts of pf out of contrib.
Actual movements:
sys/contrib/pf/net/*.c -> sys/netpfil/pf/ sys/contrib/pf/net/*.h -> sys/net/ contrib/pf/pfctl/*.c -> sbin/pfctl contrib/pf/pfctl/*.h -> sbin/pfctl contrib/pf/pfctl/pfctl.8 -> sbin/pfctl contrib/pf/pfctl/*.4 -> share/man/man4 contrib/pf/pfctl/*.5 -> share/man/man5
sys/netinet/ipfw -> sys/netpfil/ipfw
The arguable movement is pf/net/*.h -> sys/net. There are future plans to refactor pf includes, so I decided not to break things twice.
Not modified bits of pf left in contrib: authpf, ftp-proxy, tftp-proxy, pflogd.
The ipfw(4) movement is planned to be merged to stable/9, to make head and stable match.
Discussed with: bz, luigi
show more ...
|
|
Revision tags: release/8.3.0_cvs, release/8.3.0, release/9.0.0 |
|
| #
8813217a |
| 04-Nov-2011 |
Bjoern A. Zeeb <[email protected]> |
Always use the opt_*.h options for ipfw.ko, not just when compiled into the kernel. Do not try to build the module in case of no INET support but keep #error calls for now in case we would compile it
Always use the opt_*.h options for ipfw.ko, not just when compiled into the kernel. Do not try to build the module in case of no INET support but keep #error calls for now in case we would compile it into the kernel.
This should fix an issue where the module would fail to enable IPv6 support from the rc framework, but also other INET and INET6 parts being silently compiled out without giving a warning in the module case.
While here garbage collect unneeded opt_*.h includes. opt_ipdn.h is not used anywhere but we need to leave the DUMMYNET entry in options for conditional inclusion in kernel so keep the file with the same name.
Reported by: pluknet Reviewed by: plunket, jhb MFC After: 3 days
show more ...
|
| #
75e54d60 |
| 27-Sep-2011 |
Bjoern A. Zeeb <[email protected]> |
Unbreak no-ip and no-inet6 module builds with ipfw. For now continue to build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the assumption that the private L2 hook (which hopefully eve
Unbreak no-ip and no-inet6 module builds with ipfw. For now continue to build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the assumption that the private L2 hook (which hopefully eventually will be a pfil hook as well) can still be useful.
Allow building the module without inet as well.
Glanced at by: jhb MFC after: 3 days
show more ...
|
| #
5bb3652f |
| 12-Sep-2011 |
John Baldwin <[email protected]> |
Allow the ipfw.ko module built with a kernel to honor any IPFIREWALL_* options defined in the kernel config. This more closely matches the behavior of other modules which inherit configuration setti
Allow the ipfw.ko module built with a kernel to honor any IPFIREWALL_* options defined in the kernel config. This more closely matches the behavior of other modules which inherit configuration settings from the kernel configuration during a kernel + modules build.
Reviewed by: luigi Approved by: re (kib) MFC after: 1 week
show more ...
|
| #
76f8c5c9 |
| 29-Mar-2011 |
Andrey V. Elsukov <[email protected]> |
Do not build ip_fw_nat.c for ipfw.ko. It can be build as separate module.
MFC after: 1 week
|
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0 |
|
| #
183fd3c9 |
| 24-Mar-2010 |
Luigi Rizzo <[email protected]> |
MFC r200636, list all files needed to build the ipfw module
Submitted by: Alexander Wittig
|
|
Revision tags: release/7.3.0_cvs, release/7.3.0 |
|
| #
8c5d93d4 |
| 17-Dec-2009 |
Luigi Rizzo <[email protected]> |
Now that ipfw is split into multiple files, we need to list them all in the Makefile for the module, otherwise it won't load due to missing symbols.
The problem only affected head with ipfw built as
Now that ipfw is split into multiple files, we need to list them all in the Makefile for the module, otherwise it won't load due to missing symbols.
The problem only affected head with ipfw built as a module.
Reported by David Horn
show more ...
|
|
Revision tags: release/8.0.0_cvs, release/8.0.0 |
|
| #
8d8bc018 |
| 08-Jun-2009 |
Bjoern A. Zeeb <[email protected]> |
After r193232 rt_tables in vnet.h are no longer indirectly dependent on the ROUTETABLES kernel option thus there is no need to include opt_route.h anymore in all consumers of vnet.h and no longer dep
After r193232 rt_tables in vnet.h are no longer indirectly dependent on the ROUTETABLES kernel option thus there is no need to include opt_route.h anymore in all consumers of vnet.h and no longer depend on it for module builds.
Remove the hidden include in flowtable.h as well and leave the two explicit #includes in ip_input.c and ip_output.c.
show more ...
|
| #
d5fc25e5 |
| 06-Jun-2009 |
Robert Watson <[email protected]> |
Remove opt_mac.h generation for various kernel modules that no longer require it.
Submitted by: pjd
|
| #
908e960e |
| 05-Jun-2009 |
Luigi Rizzo <[email protected]> |
move kernel ipfw-related sources to a separate directory, adjust conf/files and modules' Makefiles accordingly.
No code or ABI changes so this and most of previous related changes can be easily MFC'
move kernel ipfw-related sources to a separate directory, adjust conf/files and modules' Makefiles accordingly.
No code or ABI changes so this and most of previous related changes can be easily MFC'ed
MFC after: 5 days
show more ...
|
|
Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0 |
|
| #
4b79449e |
| 02-Dec-2008 |
Bjoern A. Zeeb <[email protected]> |
Rather than using hidden includes (with cicular dependencies), directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files.
For now, this
Rather than using hidden includes (with cicular dependencies), directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files.
For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h.
Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation
show more ...
|
|
Revision tags: release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
| #
60ee3847 |
| 03-Jul-2007 |
Max Laier <[email protected]> |
Link pf 4.1 to the build: - move ftp-proxy from libexec to usr.sbin - add tftp-proxy - new altq mtag link
Approved by: re (kensmith)
|
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
| #
d94f2a68 |
| 12-Sep-2006 |
Christian S.J. Peron <[email protected]> |
Introduce a new entry point, mac_create_mbuf_from_firewall. This entry point exists to allow the mandatory access control policy to properly initialize mbufs generated by the firewall. An example whe
Introduce a new entry point, mac_create_mbuf_from_firewall. This entry point 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
show more ...
|