summaryrefslogtreecommitdiff
path: root/sbin/pfctl
AgeCommit message (Collapse)Author
2008-07-25don't redefine INFINITY -- math.h defines it nowMartynas Venckus
pointed out by, and ok david@, go ahead henning@
2008-07-24check sysctl return valueHenning Brauer
From: Gleydson Soares <gsoares@gmail.com>, ryan ok
2008-07-03do not forget to initialize other member of $$ in qname; noted by mark shroyerTheo de Raadt
ok henning
2008-06-29Simplify state creation code; merge state import/export code between pfsyncRyan Thomas McBride
and the state-related pf(4) ioctls, and make functions in state creation and destruction paths more robust in error conditions. All values in struct pfsync_state now in network byte order, as with pfsync. testing by david ok henning, systat parts ok canacar
2008-06-21Fix "-T expire"; clear pfra_fback on addresses before sending them back toRyan Thomas McBride
the kernel to be deleted.
2008-06-11remove an ugly article;Jason McIntyre
2008-06-10Make counters on table addresses optional and disabled by default.Ryan Thomas McBride
Use the 'counters' table option in pf.conf if you actually need them. If enabled, memory is not allocated until packets match an address. This saves about 40% memory if counters are not being used, and paves the way for some more significant cleanups coming soon. ok henning mpf deraadt
2008-06-10save somespace in the state by collapsing two 8 bit ints used as booleansHenning Brauer
into one 8 bit flags field. shrinks the state structure by 4 bytes on 32bit archs ryan ok
2008-06-10in verbose mode indicate which states are sloppy, ryan reyk theoHenning Brauer
2008-06-10new state option "sloppy" to use the sloppy tcp state tracker insteadHenning Brauer
of the good one. ok theo ryan reyk
2008-05-29Second half of PF state table rearrangement.Ryan Thomas McBride
- Mechanical change: Use arrays for state key pointers in pf_state, and addr/port in pf_state_key, to allow the use of indexes. - Fix NAT, pfsync, pfctl, and tcpdump to handle the new state structures. In struct pfsync_state, both state keys are included even when identical. - Also fix some bugs discovered in the existing code during testing. (in particular, "block return" for TCP packets was not returning an RST) ok henning beck deraadt tested by otto dlg beck laurent Special thanks to users Manuel Pata and Emilio Perea who did enough testing to actually find some bugs.
2008-05-27Fix count of states flushed, broken when the psnk_af hack was removed in ↵Ryan Thomas McBride
pf_ioctl.c r1.196.
2008-05-16no need to quote the argument to .Nd, now that it's nice and short;Jason McIntyre
2008-05-16There is not really a network address translation device.Marco Pfatschbacher
Remove it from the name section. OK mcbride, henning
2008-05-09Add support to kill states by rule label or state id.Marco Pfatschbacher
Fix printing of the state id in pfctl -ss -vv. Remove the psnk_af hack to return the number of killed states. OK markus, beck. "I like it" henning, deraadt. Manpage help from jmc.
2008-05-09Replace a crockpot of semi-cloned productions for handling portTheo de Raadt
numbers with one, and fix a few other bugs along the way ok mpf henning
2008-05-09convert port byte order in the production; add port keyword; ok deraadt@Markus Friedl
2008-05-09divert packets to local socket without modifying the ip header;Markus Friedl
makes transparent proxies much easier; ok beck@, feedback claudio@
2008-05-08make "to any" optional in binat, or well, the implied default.Theo de Raadt
requested by reyk, ok reyk mpf
2008-05-08Loosen grammer to permit any number of newlines within most kinds of { }Theo de Raadt
blocks, as requested by reyk; ok reyk mpf henning
2008-05-08Bring back (in a more yacc friendly way) support for setting variablesTheo de Raadt
to a sequence of strings and numbers, which get folded together into one string (and later, when used, is re-lexed) ok mpf
2008-05-07do not assume PF_INOUT is 0 in the enum; ok mcbrideTheo de Raadt
2008-05-07scrub packets based on tags; ok henningMarkus Friedl
2008-05-07allow setting TOS with scrub; ok mcbride, claudioMarkus Friedl
2008-05-06Document new state creation counter for pfctl -s labelsMarco Pfatschbacher
2008-05-06Add a counter to record how many states have been created by a rule.Marco Pfatschbacher
It shows up in pfctl verbose mode and in the 7th field of the labels output. Also remove the label printing for scrub rules, as they do not support labels. OK dhartmei@ (on an earlier version), henning@, mcbride@
2008-04-21optnl is a crutch for those who do not understand yacc. itTheo de Raadt
leads to a variety of errors; ok mcbride
2008-02-13Use HW_PHYSMEM64.Mark Kettenis
ok henning@
2008-02-01Enable the rest of the filter_opts to be used on anchors. These were acceptedRyan Thomas McBride
by the parser but not passed to the kernel. This allows filtering based on uid, gid, icmp options, tcp flags, os fingerprint, tos, tags, and probability; It also allows the label to be set. State options and tagging are not permitted. ok henning mpf
2008-01-26Create the automatic tables at the base of the anchor stack rather thanRyan Thomas McBride
in the inline anchor. Fixes optimizer bug where automatic table creation in inline anchors fails because rules are now loaded after optimization and no transaction has been opened for the anchor. bug reported by Henrik Johansen ok henning dhartmei
2008-01-25Get rid of warning when compiling with OPT_DEBUG.Ryan Thomas McBride
2007-12-05remove unused functionsCharles Longeau
from tobias@ ok mcbride@ tobias@
2007-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-11-13Bring back the number converter for 'set hostid'.Marco Pfatschbacher
I forgot to think about hex numbers when I removed it. OK deraadt@
2007-11-12Remove space/tab compression function from lgetc() and replaceMarco Pfatschbacher
it with a simple filter in the yylex() loop. The compression in lgetc() didn't happen for quoted strings, thus creating a regression when tabs were used in variables. Some testing by todd@ and pyr@ OK deraadt@
2007-10-25Fix probability rules w/ numbers (e.g probability 0.4).Marco Pfatschbacher
Add support for probablities of 0% and 100%. With and OK deraadt@
2007-10-24HW_PHYSMEM is unsignedPeter Stromberg
yuck & ok henning@
2007-10-22sync with daemon parser code.Pierre-Yves Ritschard
ok deraadt@
2007-10-22pfctl does not need file secrecyTheo de Raadt
2007-10-16Allow unquoted numbers in variables.Marco Pfatschbacher
Change 'set hostid' to NUMBER and remove unneeded converter. Add '=' to allowed_to_end_number(x) to make varsets like 4=5 illegal. OK deraadt@
2007-10-16in the lex... even inside quotes, a \ followed by space or tab shouldTheo de Raadt
expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). pointed out by mpf, discussed with pyr
2007-10-15specifying int instead of just unsigned is better styleTheo de Raadt
2007-10-13support an include directive; file of course must also be "secure" likeTheo de Raadt
the main configuration file; ok henning
2007-10-13in all these programs using the same pfctl-derived parse.y, re-unify theTheo de Raadt
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
2007-10-11next step in the yylex unification: handle quoted strings in a nicer fashionTheo de Raadt
as found in hoststated, and make all the code diff as clean as possible. a few issues remain mostly surrounding include support, which will likely be added to more of the grammers soon. ok norby pyr, others
2007-10-01Backout NUMBER to string conversion.Marco Pfatschbacher
Requested by deraadt@
2007-09-27Add loginterface support for groups.Marco Pfatschbacher
Using a group sums up the statistics of all members. Modify pfctl(1) slightly to allow a groupname "all", which gives us an overall pf(4) statistic. OK henning@, markus@
2007-09-23Allow numbers to be used as unquoted strings again.Marco Pfatschbacher
While there, also restrict the use of concatenated, unquoted strings for variable assignments only. Eyeballed by markus@, OK henning@
2007-09-12add a missing range check for rtable ids; ok cloder henningTheo de Raadt
2007-09-12Add support to the lex for parsing number out of the stream. handleTheo de Raadt
this in the parser. because the new numbers are int64_t, many new range checks for < 0 are needed. re-check and improve all the existing rangechecks while at it. thanks for help by cloder and dhartmei