Commit Graph

27 Commits

Author SHA1 Message Date
yamt fff57c5525 merge yamt-pf42 branch.
(import newer pf from OpenBSD 4.2)

ok'ed by peter@.  requested by core@
2008-06-18 09:06:25 +00:00
dyoung f72063f0c8 Note NSF support. 2008-05-15 04:16:00 +00:00
matt e0eafe6e38 infile is const char *, not char * 2008-02-20 18:20:21 +00:00
matt ccfd1d4480 errbuf is [], not *. 2008-02-20 18:19:18 +00:00
tls 67fcd29261 Do not include internal header files from libpcap without setting the
feature-test macros they use.  Really, of course, this code should not
include such header files at all.
2007-05-28 11:55:19 +00:00
dyoung f7748bc6aa pfctl: extend pf.conf(5) syntax. Let the operator supply an optional
"state lock" flag (if-bound, gr-bound, floating) at the end of a
NAT rule.  The new syntax is backwards-compatbile with the old
syntax.

PF (kernel): change the macro BOUND_IFACE() to the inline function
bound_iface(), and add a new argument, the applicable NAT rule.
Use both the flags on the applicable filter rule and on the applicable
NAT rule to decide whether or not to bind a state to the interface
or the group where it is created.
2007-05-10 22:30:54 +00:00
peter dd191f37f3 Merge the peter-altq branch.
(sync with KAME & add support for using ALTQ with pf(4)).
2006-10-12 19:59:07 +00:00
christos 5e4126c34c Coverity CID 3498: Don't return after yyerror(); cleanup first. 2006-09-27 15:35:12 +00:00
peter 3942d3e2ab Revert previous and fix properly.
- The array must be NULL terminated because other code depends on it.
- Use this terminator to check if we're at the end of the array instead
  of doing sizeof(pf_timeouts) / sizeof(pf_timeouts[0]).
2006-07-03 20:26:19 +00:00
christos b2f6added5 Coverity CID 577: remove dead code; minburst can never be 0 at this point. 2006-03-21 20:49:54 +00:00
christos e46022bb52 Coverity CID 1514: Don't access static array beyond the end of it.
In this case PFTM_MAX == 20 and sizeof(pf_timeouts) / sizeof(pf_timeouts[0])
== 21, using a loop with the size of the array and checking for reaching the
end of the loop via j == PFTM_MAX does not work. Change the loop to use
PFTM_MAX as the upper bound and add an assertion in the code to make sure
that pf_timeouts is large enough. Finally remove last NULL element of the
array so that the array has 20 elements again.
2006-03-21 20:47:27 +00:00
christos 1a21d9be9f Coverity CID 2057: Don't forget to free tcpopts when you are done. 2006-03-21 20:31:56 +00:00
peter c4add27fee Fix a few Xrefs. 2005-08-07 01:05:51 +00:00
peter f9967d10c9 Resolve conflicts (pf from OpenBSD 3.7, userland part). 2005-07-01 12:43:50 +00:00
lukem 4952bc0ec3 appease gcc -Wuninitialized 2005-06-02 09:58:55 +00:00
peter 94921da3bb Changes to build on NetBSD:
* #ifdef out some things we don't have or do differently.
* Write struct "pcap_sf_pkthdr" instead of "pcap_pkthdr".
  Fixes an LP64 specific problem with reading the pflog with tcpdump(8).
  (OpenBSD fixed this by changing the structs to always use 32-bit fields)

Reviewed by yamt@.
2005-03-15 16:26:49 +00:00
yamt bc7b47989b a bug fix from OPENBSD_3_6.
> revision 1.2.2.1
> date: 2004/12/17 02:51:35;  author: brad;  state: Exp;  lines: +2 -2
> MFC:
> Fix by frantzen@
>
> &&/|| inversion would try to merge IP addresses with non-addresses into a
> single table causing a ruleset load error and eventually a double-free.
>
> ok deraadt@ mcbride@ henning@ frantzen@ dhartmei@
2004-12-19 10:27:46 +00:00
peter f7da5a456d Apply a patch from the OPENBSD_3_6 branch, ok itojun.
MFC:
Fix by dhartmei@

do not assume entries in pf_timeouts[] are ordererd like PFTM_* in pfvar.h
reported by Alexey E. Suslikov
2004-11-21 18:01:14 +00:00
yamt 23c8222edb merge after importing pf from openbsd 3.6. (userland part)
some files were imported to the different places from the previous version.
v3_5:
	etc/pf.conf
	etc/pf.os
	etc/spamd.conf
	share/man/man4/pf.4
	share/man/man4/pflog.4
	share/man/man5/pf.conf.5
	share/man/man5/pf.os.5
	share/man/man5/spamd.conf.5
v3_6:
	dist/pf/etc/pf.conf
	dist/pf/etc/pf.os
	dist/pf/etc/spamd.conf
	dist/pf/share/man/man4/pf.4
	dist/pf/share/man/man4/pflog.4
	dist/pf/share/man/man5/pf.conf.5
	dist/pf/share/man/man5/pf.os.5
	dist/pf/share/man/man5/spamd.conf.5
2004-11-14 11:26:43 +00:00
yamt 533d14a1b9 import pf from OpenBSD 3.6. (userland part) 2004-11-14 11:08:58 +00:00
dsl 26207dda78 Add (unsigned char) cast to ctype functions 2004-10-29 19:46:27 +00:00
wiz 94cdd0ee08 Add RCS Id. 2004-06-25 16:03:59 +00:00
wiz 5e18189b4a \*[Lt]\*[Gt] instead of "<>". Use ftp.NetBSD.org as example host. 2004-06-25 16:01:22 +00:00
hannken 5356e2c1a9 Resolve printf arg/type conflict on sparc64.
Fix PR #26030 and part of #26012
2004-06-24 11:05:10 +00:00
itojun 8bc0b4b95d escape from old-ALTQ and new-ALTQ difference 2004-06-23 04:38:43 +00:00
itojun ad399b67b8 PF from openbsd 3.5
massage pfctl to compile/run on netbsd.  put reachover makefile for pfctl
into src/sbin.
reviewed by matt, perry, christos
2004-06-22 15:16:29 +00:00
itojun 9e6c9caf46 PF from openbsd 3.5 2004-06-22 15:06:49 +00:00