summaryrefslogtreecommitdiff
path: root/sbin/pfctl
AgeCommit message (Collapse)Author
2004-03-15cast %llu arguments to unsigned long long, from Max Laier,Daniel Hartmeier
ok henning@ cedric@
2004-03-14#include fixes, from Max Laier, ok beck@ henning@Daniel Hartmeier
2004-03-10Actually use SRCS+= so that we don't have a wrapped line.Ryan Thomas McBride
2004-03-10plug 3 memory leaks; 2 from andrushock, 1 by meHenning Brauer
ok pb deraadt
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-03no newline in errx, bad cedric; spotted by teduTheo de Raadt
2004-03-01support "tagged <name>" on anchor rules, suggested by vd@vmunix.lt,Daniel Hartmeier
ok henning@, cedric@
2004-02-27make pfctl -s all a bit more useful again by not printing a lllooooooottttt ofHenning Brauer
OS fingerprints and a list of interface drivers... cedric deraadt ok
2004-02-26Fix/Simplify printing of titles with "pfctl -s all". ok mcbride@Cedric Berger
2004-02-26Fix pfctl -sa output. Found by David Krause, ok mcbride@Cedric Berger
2004-02-25Don't clear global stuff when an anchor is given in addition to -Fa.Cedric Berger
Ok mcbride@ pb@
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
2004-02-24Check for 'source-track rule' with 'max-src-nodes'.Ryan Thomas McBride
ok cedric@ henning@
2004-02-19Makes pfctl -ss and pfctl -sq use optional -i argument.Cedric Berger
ok dhartmei@ markus@ mcbride@
2004-02-19Makes pfctl -Fs and pfctl -w works with the optional -i specifier.Cedric Berger
Kernel/Userland Sync needed. ok dhartmei@ jmc@ markus@ mcbride@
2004-02-19now that qids are managed entirely in the kernel, the qid related codeKenjiro Cho
is no longer needed in pfctl. ok, henning@
2004-02-17add -i flag, use it for -sI as a start. ok henning@, ok+test mcbride@Cedric Berger
2004-02-12- sort SYNOPSIS and options listJason McIntyre
- add -p to SYNOPSIS - uppercase start of sentence - sync usage() w/ SYNOPSIS
2004-02-12add -p flag to specify the device - ok mcbride@, henning@ with no objectionsBob Beck
from deraadt@
2004-02-11Fix interface clobbering for link-local addresses. Found by Pyun YongHyeon.Cedric Berger
Fix "antispoof for foo" when foo has no addresses. ok+help dhartmei@, ok mcbride@
2004-02-10KNFDaniel Hartmeier
2004-02-10KNFHenning Brauer
2004-02-10lotsoflotsoflotsof KNFHenning Brauer
and an off by one
2004-02-10KNFHenning Brauer
2004-02-10fix at leats the worst of Cedric "KNF is for everybody but me" Berger's fuckupHenning Brauer
2004-02-10new kernel reports enabled & disabled time - use that info.Cedric Berger
ok henning@ mcbride@
2004-02-05pfctl_update_qstats() returns -1 on error and the # of queues otehrwiseHenning Brauer
fix a check of the return value to cope woth that inspired by PR3675 from Marc Huber <Marc.Huber@web.de>, fixed slightly different.
2004-02-04Handle rules like 'pass ... proto { tcp udp icmp } ... modulate state'Ryan Thomas McBride
ok dhartmei@ henning@
2004-02-04Fix a number of bugs with setting pool limits which I introduced withRyan Thomas McBride
source-tracking. Found by Pyun YongHyeon. Also add support to pfctl to set the src-nodes pool limit. "Luckily" some of the bugs cancel each other out; update kernel before pfctl. ok dhartmei@
2004-02-03fix PR 3664 / jared r r spiegelHenning Brauer
we need to save the unexpanded tag/tagged strings before entering the expansion loop, and at each loop, start with the unexpanded tag, so that on subsequent loops the macros are replaced with current values and not the values from previous loop persist ryan theo ok
2004-02-03bring back this fluffy change, of course without the bug:Henning Brauer
== to parse v4 adresses, only use inet_net_pton when we find a /, otherwise use inet_pton. helps bob who likes to type 1.2 3.4 instead of 1.2.3.4 and wonders why this results in two addresses. PR3638, bob ok == make sure bits is either 32 or what inet_net_pton tells us, and always call set_ipmask to mask the boring bits away ok dhartmei@ mcbride@ david@
2004-01-29Clean up 'pfctl -s all' output.Ryan Thomas McBride
ok deraadt@ henning@
2004-01-26we must not omit printing the netmask when it is all zero, this is dangerous -Henning Brauer
1.2.3.4/0 is not equal to 1.2.3.4... this "helped" to make failure already only omit the netmask when both the addr and the mask itself are all zero (the "any" case) ok dhartmei@ mcbride@
2004-01-25This fix was made WITHOUT RUNNING REGRESS. Henning, you are beingTheo de Raadt
extremely unfluffy, King Bula is coming for your head.
2004-01-22to parse v4 adresses, only use inet_net_pton when we find a /, otherwiseHenning Brauer
use inet_pton. helps bob who likes to type 1.2 3.4 instead of 1.2.3.4 and wonders why this results in two addresses. PR3638, bob ok
2004-01-14eliminate the predefined special qids so that qids become simpleKenjiro Cho
identifiers without embedded meanings. this also allows us to make the semantics of the qid assignment in line with the tag assignment in the next step. ok, henning@
2004-01-05few off by ones in strlcpy overflow check; Patrick LatifiHenning Brauer
2004-01-05include path fixes for gcc3.Marc Espie
tests otto@, okay millert@
2004-01-04don't ignore "!" on "binat on !foo". ok mcbride@Cedric Berger
2003-12-31spacing. note this, cedricTheo de Raadt
2003-12-31Many improvements to the handling of interfaces in PF.Cedric Berger
1) PF should do the right thing when unplugging/replugging or cloning/ destroying NICs. 2) Rules can be loaded in the kernel for not-yet-existing devices (USB, PCMCIA, Cardbus). For example, it is valid to write: "pass in on kue0" before kue USB is plugged in. 3) It is possible to write rules that apply to group of interfaces (drivers), like "pass in on ppp all" 4) There is a new ":peer" modifier that completes the ":broadcast" and ":network" modifiers. 5) There is a new ":0" modifier that will filter out interface aliases. Can also be applied to DNS names to restore original PF behaviour. 6) The dynamic interface syntax (foo) has been vastly improved, and now support multiple addresses, v4 and v6 addresses, and all userland modifiers, like "pass in from (fxp0:network)" 7) Scrub rules now support the !if syntax. 8) States can be bound to the specific interface that created them or to a group of interfaces for example: - pass all keep state (if-bound) - pass all keep state (group-bound) - pass all keep state (floating) 9) The default value when only keep state is given can be selected by using the "set state-policy" statement. 10) "pfctl -ss" will now print the interface scope of the state. This diff change the pf_state structure slighltly, so you should recompile your userland tools (pfctl, authpf, pflogd, tcpdump...) Tested on i386, sparc, sparc64 by Ryan Tested on macppc, sparc64 by Daniel ok deraadt@ mcbride@
2003-12-30fix TAILQ abuse.Henning Brauer
TAILQ_REMOVE is a no-no within a TAILQ_FOREACH loop. also free the symbol itself after removal. all found while hacking bgpd which incorporates pfctl's sym code (macros). ok cedric@
2003-12-27Remove extra \n from pf_print_state().Ryan Thomas McBride
ok deraadt@ cedric@
2003-12-19i wrote much of these, assert my copyrightHenning Brauer
2003-12-19assert copyright. i rewrite much of thisTheo de Raadt
2003-12-17cosmetics, ok mcbride@Daniel Hartmeier
2003-12-16quotes, spaces and bars do not need to be escaped within displays;Jason McIntyre
.Nm does not need an argument; dashes should be escaped;
2003-12-16Check that max-src-states and max-src-nodes are not being set to 0.Ryan Thomas McBride