summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
AgeCommit message (Collapse)Author
2005-06-14no need to restrict tagging to stateful rules any more, dhartmei okHenning Brauer
From: "Alexey E. Suslikov" <cruel@texnika.com.ua>
2005-05-27get rid of 'log-all'. now that we have 'log (options)', make 'all' anDaniel Hartmeier
option to log. so, 'log-all' becomes 'log (all)'.
2005-05-27get rid of shift/reduce conflicts, don't support empty logoptsDaniel Hartmeier
2005-05-27log two pairs of uid/pid through pflog: the uid/pid of the process thatDaniel Hartmeier
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@.
2005-05-27allow 'tagged' in 'anchor' rules (without complaining about missingDaniel Hartmeier
'keep state'), as a condition to branch into the anchor. suggested by Bill Marquette.
2005-05-26The illegalness of "no nat log" is already enforced by the grammar.Camiel Dobbelaar
ok dhartmei
2005-05-26support 'log' and 'log-all' in 'nat/rdr/binat pass' rules. original patchDaniel Hartmeier
from camield@. use #defines PF_LOG, PF_LOGALL instead of magic constants. ok frantzen@, camield@
2005-05-23remove code that duplicates getservice()Camiel Dobbelaar
ok dhartmei mcbride
2005-05-21clean up and rework the interface absraction code big time, rip out multipleHenning Brauer
useless layers of indirection and make the code way cleaner overall. this is just the start, more to come... worked very hard on by Ryan and me in Montreal last week, on the airplane to vancouver and yesterday here in calgary. it hurt. ok ryan theo
2005-04-22Catch bad flags, ie. flags that always evaluate to false. This happensCamiel Dobbelaar
if there are flags on the lefthandside that are masked off by the righthand side. ok mcbride@ (long time ago) dhartmei@ henning@
2005-03-07print unsigned long with %lu, not with %d and not with %ld.Henning Brauer
From: Andrey Matveev <andrushock@korovino.net>
2005-03-06allow commas in the hfsc service curve spec, inconsistency pointed out inHenning Brauer
PR4134 / geoff@collyer.net and a longer mail exhcange with han boetes
2005-03-06print "set skip on" with -v in such a way that the output is valid inputDaniel Hartmeier
syntax, instead of the cryptic hex flags output.
2005-02-27support 'tagged' in translation rules, non-delayed tag lookupDaniel Hartmeier
ok henning@, deraadt@
2005-02-26ypu sure get the impression the number of memory leaks in error pathesHenning Brauer
is infinite... Andrey Matveev <andrushock@korovino.net> spotted a few again!
2005-02-07KNF; ok henning@David Krause
2005-01-28add messages for syntax errors that caused silent failure before.Daniel Hartmeier
found by Peter Fraser, ok henning@
2005-01-27dynamic interface names must start with a letter. catches the nonsensicalDaniel Hartmeier
"(10.1.2.3)" that results from a simple typo like "$(ext_ip)" instead of "$(ext_if)".
2005-01-05Modify pfctl behaviour so that 'set ...' options are no longer "sticky", ie.Ryan Thomas McBride
they are reset to default values if omitted from a subsequent ruleset load. Also: - make sure 'set ...' options are not loaded in anchors. - add a -m ("merge") flag to pfctl which allows an individual option to be set without reseting the others, eg: # echo "set loginterface fxp0" | pfctl -mf - ok henning@ dhartmei@
2004-12-29Print 'set fingerprints' correctly when parsing verbosely.Ryan Thomas McBride
2004-12-23set rule_flag PFRULE_SRCTRACK when setting srctrack, found by camield@Daniel Hartmeier
using regress test pf84
2004-12-22Introduce 'set skip on <ifspec>' to support a list of interfaces where noDaniel Hartmeier
packet filtering should occur (like loopback, for instance). Code from Max Laier, with minor improvements based on feedback from deraadt@. ok mcbride@, henning@
2004-12-15missing free()s; with patHenning Brauer
2004-12-10allow pf to filter on route labelsHenning Brauer
pass in from route dtag keep state queue reallyslow tested by Gabriel Kihlman <gk@stacken.kth.se> and Michael Knudsen <e@molioner.dk> and ryan ok ryan
2004-12-08Add "'overload' requires 'max-src-conn' or 'max-src-conn-rate'" sanity check,Ryan Thomas McBride
fix some cut-n-paste mayhem in other related checks.
2004-12-07re-commit mcbride@'s 'flush global', this time without the breakage inDaniel Hartmeier
pfvar.h. builds kernel and userland.
2004-12-07real backoutTheo de Raadt
2004-12-07oops, incomplete backoutTheo de Raadt
2004-12-07tree does not compile, spotted by dlg (not obvious how to fix)Theo de Raadt
---- Change the default for 'overload <table> flush' to flush only states from the offending source created by the rule. 'flush global' flushes all states originating from the offending source. ABI change, requires kernel and pfctl to be in sync. ok deraadt@ henning@ dhartmei@
2004-12-07Change the default for 'overload <table> flush' to flush only states from theRyan Thomas McBride
offending source created by the rule. 'flush global' flushes all states originating from the offending source. ABI change, requires kernel and pfctl to be in sync. ok deraadt@ henning@ dhartmei@
2004-12-05initialize $$->tail and $$->next for MAXSRCCONNRATEDaniel Hartmeier
2004-12-04Userland support for limiting open tcp connections per source. eg:Ryan Thomas McBride
keep state (max-src-conn 1000, max-src-conn-rate 100/10, overflow <bad> flush) allow a maximum of 1000 open connections or 100 new connections in 10 seconds. The addresses of offenders are added to the <bad> table which can be used in the ruleset, and existing states from that host are flushed. ok deraadt@ dhartmei@
2004-09-21Implement "no scrub" to allow exclusion of specific traffic from scrub rules.Aaron Campbell
First match wins, just like "no {binat,nat,rdr}". henning@, dhartmei@ ok
2004-06-29remove cedric's bogus interface name verification code.Henning Brauer
this was meant to verify that ne3 is a valid interface that could show up, but bogus0 is not. while this might sound like a good idea it is completely broken and causes a shitload of problems. just allow for anything as interface name, the kernel abstracts that nice enough. if no interface by that name exists (or shows up) the rule never matches; that matches pf semantics used everywhere else. this also fixes the "pfctl always has to run as root" issue that cedric did not fix over the last 6 months despite being bugged to regularily. help & ok mcbride@
2004-06-29convert a few memcpy()s to strlcpy() so we don't copy uninitialized junk intoMike Frantzen
a interface name's slack space past the \0. will be needed for the optimizer. ok henning@
2004-06-26add back PF_INOUT, fixes reassemble tcpDavid Krause
ok canacar@ mcbride@
2004-06-25repair tree nanobreak by the nanobumTheo de Raadt
2004-06-10rename struct pf_rule_addr member 'not' to 'neg', as 'not' is a reservedDaniel Hartmeier
keyword in C++. ok henning@, cedric@
2004-05-21Use '/' instead of ':' as separator for anchor path components. Note thatDaniel Hartmeier
the parser now needs quotes around paths containing separators. ok mcbride@
2004-05-19Allow recursive anchors (anchors within anchors, up to 64Daniel Hartmeier
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@
2004-04-24Add "probability xxx" rule modifier. ok deraadt@Cedric Berger
2004-04-22typo, From: Jared Yanovich <jjy2+@pitt.edu>Henning Brauer
2004-04-14make antispoof work with dynamic addresses. ok dhartmei@ mcbride@Cedric Berger
2004-03-20spelling fix; ok dhartmei@ henning@ deraadt@David Krause
2004-03-14#include fixes, from Max Laier, ok beck@ henning@Daniel Hartmeier
2004-03-08plug 124 memory leaksHenning Brauer
ok mcbride@ pb@ dhartmei@
2004-03-06from bgpd:Henning Brauer
plug a memory leak in the lexer. the issue is this code fragement from yylex(): . token = lookup(buf); . yylval.v.string = strdup(buf); . if (yylval.v.string == NULL) . err(1, "yylex: strdup"); . return (token); lookup() tries to match buf against a list of keywords, and returns the associated token if it has a match, or the token STRING otherwise. STRING is the only token that needs (and free()s) yylval.v.string. however, we assigned memory for it with the strdup in yylex for each and every token. the fix is obviously only setting yylval.v.string when lookup() returns STRING. Patrick Latifi noticed that something was leaking with token handling, analysis and fix by me. ok deraadt@
2004-03-01support "tagged <name>" on anchor rules, suggested by vd@vmunix.lt,Daniel Hartmeier
ok henning@, cedric@
2004-02-24'max-src-nodes' requires 'source-track rule'. Set that automatically,Ryan Thomas McBride
unless 'source-track global' is explicit, in which case error out. Lots of help from cedric@. ok cedric@ henning@
2004-02-24fixup.Cedric Berger