summaryrefslogtreecommitdiff
path: root/sbin/pfctl
AgeCommit message (Collapse)Author
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
2007-08-30add support for address ranges ("from 10.1.2.50 - 10.1.3.75") in from/toDaniel Hartmeier
criteria. ok mcbride@
2007-07-01states here too not stateHenning Brauer
2007-06-30allow states instead of just state for -s and -F for consistency's sake.Henning Brauer
since only the first letter matters in the end and state still matches states since we do strncmp this does not change xisting behaviour and just allows plural states to be used as well. pt out by Tom Van Looy <tom@ctors.net>
2007-06-21always initialize logif, from max laier, ok ryanHenning Brauer
2007-06-20Allow "log" for nat rules without "pass".Marco Pfatschbacher
OK henning@, ``passt scho'' markus@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-31Cope with new ioctl interface (use pfsync_state instead of pf_state)Ryan Thomas McBride
ok henning@ toby@ pyr@
2007-05-27No need to shutdown(2) DGRAM socket before closing it. Found while lookingClaudio Jeker
at the code with jdixon@
2007-04-21"o" in optiopt_list is superfluous now tooHenning Brauer
2007-04-21fix -o handling. syntax is now -o none|basic|profile. -o without argumentHenning Brauer
is invalid now, it doesn't serve any purpose any more anyway since that is the default. ok mcbride
2007-04-20no whitespace allowed between -o and its argument, so update doc/usage()Jason McIntyre
to reflect this; whilst there i had to wrap -t in Xo/Xc to stop line split, and i zapped some extra whitespace in usage(); fixes user/5441 from sthen
2007-03-21Enable basic ruleset optimization by default.Ryan Thomas McBride
ok deraadt henning
2007-03-01be more careful with mixing &/| with &&/||, ok ottoTheo de Raadt
2007-02-23if machine has more than 100MB of physmem, default the max table entriesTheo de Raadt
to 200,000 instead of the conservative 100,000; ok dhartmei beck tested by ckuethe
2007-02-09pfctl_clear_rule_counters() is not needed any moreHenning Brauer
2007-02-09use DIOCGETRULE ioctl & action set to PF_GET_CLR_CNTR to clear countersHenning Brauer
with -z instead of DIOCCLRRULECTRS. Unbreaks -z with anchors and makes the read & reset operation atomic. innstrument pfctl_show_rules() to clear counters while reading rules and add a new output format for it, showing nothing, if only resetting counters without actually displaying them is requested. minor cleanups on the way. ok dhartmei & agreement from theo and ryan
2007-02-03in decide_address_family(), only limit a rule to a specific address familyDaniel Hartmeier
when ALL entries have this specific AF (when even just one entry has no specific AF, use any). found by Maurice Janssen, ok henning@
2007-01-30document -sI -v;Jason McIntyre
from Janne Johansson, tweaked by myself; ok dhartmei
2007-01-18implement -T expire.Henning Brauer
"pfctl -t tablename -T expire 3600" would expire all entries in the given table that are older than 3600 seconds. ok dhartmei, manpage help & ok jmc
2006-12-24Remove m88k compiler flags tweak which is no longer necessary since a long timeMiod Vallat
already.
2006-12-13IPv6 passive OS fingerprinting.Jun-ichiro itojun Hagino
reuses IPv4 signature file (assuming that TCP code is shared among IPv4/v6). mcbride ok.
2006-11-28fix servicecurve check; no point in checking the same sc three times, itHenning Brauer
was obviously intended to check all three. has been wrong since the beginning, 4 years... noticed by Earl Lapus <earl.lapus@gmail.com>, Vasil Dimov <vd@FreeBSD.org> mailed me then, ok mcbride
2006-11-20-K argument to kill source tracking nodes explicitly, behaves like theRyan Thomas McBride
-k argument for killing states; From Berk D. Demir <bdd@mindcast.org> ok dhartmei henning
2006-11-10Print the interface that each queue is bound to in the pfctl -sq outputJoel Knight
ok henning@
2006-11-07Only try to recursively print rules if they are actually anchors.Ryan Thomas McBride
2006-11-07Unbreak authpf by handling non-inline anchors separately from the { } anchorsRyan Thomas McBride
as pf_find_or_create_ruleset() will mangle relative anchor names and wildcards. Also fixes some nits with nesting and printing inline anchors. ok deraadt@
2006-11-05Don't open a transaction for a ruleset unless it's a brace ruleset thatRyan Thomas McBride
contains rules. Fixes DIOCXCOMMIT: Device busy when multiple anchors with the same name are specified. reported by ckuethe@ and mkb@crypt.org.ru