summaryrefslogtreecommitdiffstats
path: root/sys/net/if_pflog.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Link pflog(4) instances to `pflog_ifs' list instead of allocatingmvs2021-01-131-3/+5
| | | | | | | | | | | | `pflogifs' array. This was done to prevent panics caused by internal malloc(9) limit. Also we avoid the case while single pflog(4) interface with a high index allocates an array for all indices below and eats up kernel memory. Since we have a very little count of pflog(4) interfaces linear search does not performance impact. ok bluhm@ claudio@ kn@
* All users of the PFLOG_PACKET() macro are inside "#if NPFLOG > 0".bluhm2018-04-061-6/+1
| | | | | So this macro does not make much sense, just call pflog_packet(). OK sashan@ henning@
* Remove list member now that the global list is gone.mpi2017-05-161-2/+1
|
* change log(matches) semantics slightly to make it more useful. since ithenning2015-02-121-3/+3
| | | | | | | | | | | | | is a debug tool change of semantics not considered problematic. up until now, log(matches) forced logging on subsequent matching rules, the actual logging used the log settings from that matched rule. now, log(matches) causes subsequent matches to be logged with the log settings from the log(matches) rule. in particular (this was the driving point), log(matches, to pflog23) allows you to have the trace log going to a seperate pflog interface, not clobbering your regular pflogs, actually not affecting them at all. long conversation with bluhm about it, which didn't lead to a single bit changed in the diff but was very very helpful. ok bluhm as well.
* tedu bpf_mtap_pflog().henning2014-07-091-3/+1
| | | | | | | now that it is a trivial wrapper around the extended bpf_mtap_hdr, we can use bpf_mtap_hdr directly. added benefit: pflog_bpfcopy doesn't need to be exported any more and can stay private to if_pflog.c ok benno bluhm reyk
* Protect various driver descriptors by _KERNEL to stop exposing to muchmpi2013-06-251-7/+8
| | | | | | stuff to userland, especially the "struct ifnet". ok sthen@, henning@, uebayasi@
* there was a limit on the number of pflog interfaces - 16. remove that.henning2012-07-081-3/+1
| | | | | mostly by dynamically allocating pflogifs instead of making that a static array. ok claudio zinke
* Since the IPv6 madness is not enough introduce NAT64 -- which is actuallyclaudio2011-10-131-2/+3
| | | | | | | | "af-to" a generic IP version translator for pf(4). Not everything perfect yet but lets fix these things in the tree. Insane amount of work done by sperreault@, mikeb@ and reyk@. Looked over by mcbride@ henning@ and myself at eurobsdcon. OK mcbride@ and general put it in from deraadt@
* As requested by henning, move the mbuf pointer into struct pf_pdesc.bluhm2011-09-281-3/+3
| | | | | | Also sort pd to the beginning of the functions' parameter lists for consistency. ok henning
* Put kif and dir into pdesc an use this instead of passing the valuesbluhm2011-09-201-3/+3
| | | | | | around. This is a mechanical change. Initialize pd2 and use it where appropriate. ok henning on an earlier version; ok mpf
* reduce kernel compile time dramaticallyhenning2011-07-031-3/+3
| | | | | (you don't need to fix this file for it to compile. oups. forgotten in the last commit)
* Do not pass AF specific information to pf_test_rule() and PFLOG_PACKET()claudio2011-05-221-3/+3
| | | | | | | because either the info is already available in struct pd or easy to figure out. Makes pf_test() and pf_test6() even more similar (with the target to remove one of them in the near future). OK henning@
* aye. that should not have been forgotten. add the rewritten indicatorhenning2010-09-211-2/+3
| | | | to struct pflog. ok gcc
* pflog overhaulhenning2010-09-211-3/+11
| | | | | | | | | | | | | | | | | | | | pflog was logging the "wrong" as in not yet rewritten (nat/rdr) addresses. to address this without making an extra copy of the mbuf chain: -introduce bpf_mtap_pflog, which is a 1:1 copy of bpf_mtap_hdr, except that it supplies bpf_catchpacket with pflog_bpfcopy as copy function instead of plain bcopy -said new shiny pflog_bpfcopy knows what a pflog packet looks like, copies everything into bpf's buffer, contructs a fake mbuf (which is allocated once at attach time and reused over and over) which points to the bpf buffer as data storage -call pf_setup_pdesc on said fake mbuf -then call pf_translate to rewrite the addresses as needed right in the bpf buffer this changes the pflog header as we have to pass the new addresses/ports around. relies on canacar's awesome work in libpcap to work olrite with the new, longer pflog header as well as with the old, shorter one. almost completely written at c2k10 in canada, finished here at j2k10 in japan. ok ryan dlg
* bye bye DLT_OLD_PFLOG & friends. dead since 2003. 7 years oughta be enoughhenning2010-06-261-12/+1
| | | | ok ryan theo reyk
* allow up to 16 pflog interfaces, ok mcbridehenning2006-10-251-2/+2
|
* make the pflog interface clonable.henning2006-10-231-2/+6
| | | | | | | | | | for now, only allow pflog0 to be created. keep an array of ifps to the pflog interfaces with the unit # as index for fast access. if pflog0 does not exist, no logging is done (just like if it is down). on machines without pf enabled, this makes the pflog0 interface go away, on machines with pf, rc sets up pflog0 and starts pflogd, no change there. idea old (pf2k4 or c2k5?), hacked at the hack.lu 2006 conference, ryan ok
* log two pairs of uid/pid through pflog: the uid/pid of the process thatdhartmei2005-05-271-3/+7
| | | | | | | | | inserted the rule which causes the logging. secondly, the uid/pid of the process in case the logged packet is delivered to/from a local socket. a lookup of the local socket can be forced for logged packets with a new option, 'log (user)'. make tcpdump print the additional information when -e and -v is used. note: this changes the pflog header struct, rebuild all dependancies. ok bob@, henning@.
* Allow recursive anchors (anchors within anchors, up to 64dhartmei2004-05-191-6/+3
| | | | | | | levels deep). More work required, but this is already functional. authpf users will need to adjust their anchor calls, but this will change again soon. ok beck@, cedric@, henning@, mcbride@
* remove trailing ';' in PFLOG_REAL_HDRLEN definition. ok dhartmei@ mcbride@frantzen2004-03-191-2/+2
|
* Adjust pflog after recent byte order changes, fixes the 'truncated-ip'dhartmei2003-07-151-13/+2
| | | | errors on pflog0. Reported and tested by Ben Lovett. ok frantzen@, cedric@
* Use official (from pcap people) link type for pflog.canacar2003-05-141-7/+29
| | | | | | | | With this change, the log header format also changes. The new log format is extendible and allows logging of the originating anchor and ruleset information. ok henning@ dhartmei@ frantzen@
* keep all pflog goodies in pflog sources, avoids code duplications; okski frantzen@ and dhartmei@mickey2002-10-291-2/+20
|
* fix the endif commentmickey2001-11-081-3/+3
|
* clean up copyrightprovos2001-06-261-30/+21
|
* use reasons in pull_hdr, default log if pull_hdr fails. okay deraadt@provos2001-06-261-2/+2
|
* add a subreason to the link header to allow us to determine why a packet wasprovos2001-06-261-4/+5
| | | | dropped or passed. from discussion with theo and me.
* extend the logging via a new link header type. export interface, direction,provos2001-06-251-3/+7
| | | | action and rule nr.
* first stab at packet logging for pf. inspired by late night dreams of art.provos2001-06-251-0/+50
we just pass drop and passed packets to different pseudo interface that can be listened to with bpf.