summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
AgeCommit message (Collapse)Author
2003-03-08fix the obvious:Henning Brauer
since we do not modify the struct pf_altq *a any more but our private copy, we can of course not inherit teh scheduler type from it, since it did not inherit the scheduler type from the parent. so just inherit the scheduler type from the parent directly... ok dhartmei@ cedric@
2003-03-08in expand_queue, make a private copy of the struct pf_altq before modifyingHenning Brauer
it. modifying the original one had undesired side effects if a queue was expanded to more than one because it belonged to more than one interface ok pb@ cedric@ dhartmei@
2003-03-06fix queue assignment on filter rules which are not bound to an interface.Henning Brauer
when looking up the queue IDs using qname_to_qid, we do not need to limit the matching on the interface in question, as it is guaranteed that same named queues on different interfaces habe the same queue id. moreover, we must not limit the matches to the interface if we do not have an interface given on the filter rule to match on ;-) found after problems reported by Andre Nathan <andre at v2r dot com dot br> ok dhartmei@ pb@ cedric@
2003-03-02when printing queues at load time that have bandwidth specified in percent,Henning Brauer
print the bandwidth in percent instead of the calculated absolute value. if a queue belongs to more than one interface and they have different bandwidth the calculated absolute is of course different per interface. previously the first calculated absolute value was shown; what of course is incorrect on the second interface. note that only the print was wrong, the correct values were passed to the kernel. ok theo daniel
2003-03-02remove the control keyword for cbq queues.Henning Brauer
the control class was a legacy of the original CBQ design by LBL/Sun to support RSVP. the control class is not used in openbsd, in the sense that we don't automatically set filters for ICMP/IGMP/RSVP for the control class. ok dhartmei@ kjc@ deraadt@
2003-02-27modify error message to match the same 7 sections in pf.conf(5)David Krause
ok deraadt@ henning@
2003-02-26in expand_rule, correctly set r->pqid if a priority queue was defined, andHenning Brauer
reuse the value of r->qid if not. ok dhartmei@ mcbride@
2003-02-25some minor KNF my fingers just did...Henning Brauer
ok dhartmei@ cedric@
2003-02-25repair/simplify/flexify binat userland.Cedric Berger
ok dhartmei@ henning@
2003-02-24when a macro is redefined, don't bother with reusing the existing entry inHenning Brauer
symset() but just prepend a new sym entry to symhead like we always did. as symget searches the list sequentially, the newest one is picked first. prevents an endless loop introduced when trying to reuse the existing entry by an invalid setting for the next pointer. fixes regress test pf57. found after conversation with Chris Linn, celinn at mtu dot edu ok dhartmei@ cedric@
2003-02-21re-allow set loginterface noneHenning Brauer
ok cedric@ dhartmei@
2003-02-21better error message if set loginterface is called with nonexistantHenning Brauer
interface, found by krause (who is doing EXCELLENT work. Thank you very much!), fix by me, ok dhartmei@ and cedric@
2003-02-20reject nonexistant interfaces in the dynaddr case, noticed during discussionHenning Brauer
with jasondixon at myrealbox dot com ok dhartmei@
2003-02-19Make 'from (kue0)/24' work again (dynamic interface name translation withDaniel Hartmeier
a /prefix), reported by Jason Dixon. ok henning@
2003-02-19better error message on icmp version / address family mismatchHenning Brauer
ok markus@
2003-02-18fix load option handling (-A, -N, -R) for options.Henning Brauer
due to a bug in the loadopt check options were always loaded no matter which loadopts where specified. while beeing there, move the prints for that to where they belong, into the appropriate pfctl_set_* functions, and thus only print when the options are actually loaded. fixes regress tests pfopt3, pfopt4, pfopt5 I added earlier. ok dhartmei@
2003-02-17"optarg" was a bad pick for the variable name in pfctl_cmdline_symset, itHenning Brauer
shadows a global. rename.
2003-02-17-#include <sys/ioctl.h>Mike Pechkin
mcbride@, dhartmei@ ok
2003-02-16unneeded {}Henning Brauer
2003-02-16throw a syntax error if the portunary operator in varset is no '='Henning Brauer
extif>"whatever" should not be the same as extif="whatever" but a syntax error.
2003-02-14Allow route-to loopback interfaces again, since Ryan fixed the loops thatDaniel Hartmeier
might have occured before.
2003-02-14Better and more consistent error message.Cedric Berger
Ok dhartmei@
2003-02-13ease the yacc a bit by using a "not" rule instead of having two rules w/ andHenning Brauer
without '!' everywhere ok dhartmei@
2003-02-12KNF after ryanHenning Brauer
2003-02-12Simplify the code and make the parser handle the different rule typesRyan Thomas McBride
more consistently. - Merge expand_nat and expand_rdr into expand_rule - Merge rdrrule token into natrule ok concept henning@ ok dhartmei@
2003-02-11allow macro definition on the command line:Henning Brauer
pfctl -Dextif=wi0 -f /etc/pf.conf command line macro definitions override the ones made in the file (idea theo), very handy if your notebook has another NIC at some conference, as well as for debugging etc. idea rezine@mistrusted.net via pb@ hacked live at FOSDEM ok pb@ dhartmei@ cedric@
2003-02-09more live code from FOSDEM:Henning Brauer
make pass in proto tcp to port 80 work. -allow to omit the "any" if you're specifying a port -allow to omit the from or to part if you want "any" for the other ok dhartmei@ pb@
2003-02-09KNFHenning Brauer
2003-02-09Fix a few warnings and remove unnecessary check and cast.Camiel Dobbelaar
ok dhartmei henning
2003-02-08Add scrub option 'random-id', which replaces IP IDs with random valuesDaniel Hartmeier
for outgoing packets that are not fragmented (after reassembly), to compensate for predictable IDs generated by some hosts, and defeat fingerprinting and NAT detection as described in the Bellovin paper http://www.research.att.com/~smb/papers/fnat.pdf. ok theo@
2003-02-05Fix "pass out dup-to (tun0 1.1.1.1) inet6 all" error messageCedric Berger
Allow "pass out dup-to tun0 all" ok mcbride@ henning@
2003-02-05Set the network mask to all 1's if no address is specified for aRyan Thomas McBride
route-to/dup-to/reply-to rule. Keeps round-robin from incrementing through the entire address space. ok dhartmei@
2003-02-03prettyTheo de Raadt
2003-02-03Don't allow loopback interfaces as route/reply/dup-to targets. ok henning@Daniel Hartmeier
2003-02-03remove loadopt global definition and cleanup a bit.Cedric Berger
ok henning@
2003-02-03fix a problem with queue definitions when load options (like -N etc) areHenning Brauer
given; they used to check for their parent interface/queue even in this case. ok dhartmei@ cedric@
2003-02-02there is no need to pass opts to parse_rules explicitely; it's passed asHenning Brauer
part of the struct pfctl.
2003-01-27KNFTheo de Raadt
2003-01-25Match changes for rdr port ranges made to pf.c:Ryan Thomas McBride
- fixes behaviour of rdr on le0 from foo to bar port 1:20 -> (lo0) port 22 - makes calculated mapping more explicit for the -> (lo0) port 22:* case testing from dhartmei@ ok dhartmei@
2003-01-25Fix NOACTION with table statements.Cedric Berger
2003-01-25Permit initialisation of a table content from a file in pf.conf.Cedric Berger
Cleaning up of the table options parsing, more flexible. idea+cleanup deraadt@, ok dhartmei@, pass all regress tests.
2003-01-25Correctly check illegal constructs with tables. Better error messages.Cedric Berger
ok dhartmei@ pass all regress tests.
2003-01-25if a table name ist too long, it's actually nice to tell so instead of justHenning Brauer
aborting with a syntax error
2003-01-20Remove unused argument from print_name() and fix two other nitsCamiel Dobbelaar
found by lint. ok henning
2003-01-19Spin off label string expansion into a separate function. ClarifiesCamiel Dobbelaar
and tightens all expand_label functions. ok dhartmei henning
2003-01-18KNF after ryan...Henning Brauer
2003-01-18Add missing token string and assignment to make static-port work for real.Ryan Thomas McBride
Diff and report courtesy of mpech@ and form@ ok dhartmei@
2003-01-17bandwith -> bandwidthCamiel Dobbelaar
YYERROR on failed parseicmpspec() ok dhartmei mcbride henning
2003-01-15Typo in yyerror().Mike Pechkin
henning@
2003-01-14unified IP parser:Henning Brauer
-move host(), set_ipmask and the ifa_* functions to pfctl_parser.[c|h] -extend host() to handle /mask itself, plus minor adjustments -use that in pfctl_table.c instead of coding the same shit again discussed w/ cedric@ ok cedric@ dhartmei@