summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf_filter.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the last missing parentheses for a return statement in bpf_filter.c.jkim2008-08-291-1/+1
|
* More convergence towards style(9).jkim2008-08-291-32/+27
|
* - Directly match code wherever possible instead of using macros.jkim2008-08-291-11/+14
| | | | | | | | | | - Macrofy bitmap table lookup. Constify the table while I am here. - Add missing continue statements in the for loop. Functionally it should be the last remaining fix from: PR: kern/89752 MFC after: 1 month
* Simplify jump instruction range checks.jkim2008-08-291-7/+6
| | | | MFC after: 1 month
* Check invalid BPF codes from bpf_validate(9).jkim2008-08-281-1/+26
| | | | | | | Note that it is not critical because bpf_filter(9) returns zero when it encounters invalid code at run time. MFC after: 1 month
* Validate scratch memory addresses for BPF_STX and BPF_LDX|BPF_MEM.jkim2008-08-281-1/+3
| | | | | | | A badly written filter was able to reference invalid addresses, even cause kernel crash. MFC after: 3 days
* Make sys/net/bpf_filter.c build cleanly on user land.jkim2008-08-261-1/+3
|
* Improve convergence of bpf_filter.c toward style(9).rwatson2008-03-091-40/+29
| | | | | MFC after: 3 weeks Submitted by: csjp
* Use __FBSDID() in the kernel BPF implementation.rwatson2007-12-251-2/+3
| | | | MFC after: 3 days
* Make the type of the memory used by the BPF filter unsigned, so itdwmalone2007-09-131-1/+1
| | | | | | | | | | | matches the BPF registers (which are the only thing that is assigned to/from BPF memory). This is a pedantic change that shouldn't change any behaviour. PR: 115931 Submitted by: Matthew Luckie <mjl@luckie.org.nz> Approved by: re (bmah) MFC after: 3 weeks
* Avoid unwanted sign extension of indexed byte load in bpf code.dwmalone2006-05-281-2/+2
| | | | | | | PR: 89748 Submitted by: Guy Harris <guy@alum.mit.edu> Obtained from: NetBSD via OpenBSD MFC after: 2 weeks
* Correctly check the filter length. I committed the wrong version.jkim2006-01-031-1/+6
| | | | Pointy hat to me.
* - Explicitly validate an empty filter to match bpf_filter() comment[1].jkim2006-01-031-1/+1
| | | | | | - Do not use BPF JIT compiler for an empty filter. [1] Pointed out by: darrenr
* Do not accept an empty bpf program.jkim2005-12-081-0/+3
|
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Remove advertising clause from University of California Regent'simp2004-04-071-4/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Turn on BPF_ALIGN for all non-i386 platforms, instead of having anpeter2002-07-051-1/+1
| | | | | ifdef list that currently lists all the non-i386 platforms that bpf currently works on.
* Remove __P.alfred2002-03-191-2/+2
|
* sparc64 needs the same alignment fixes that ia64 and alpha need.jake2001-12-291-1/+1
| | | | Submitted by: tmm
* Add ia64 to the list of machines which don't do unaligned reads.dfr2001-10-051-1/+1
|
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-11/+11
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Add 'const' to the bpf_filter() and bpf_validate() prototypes.archie1999-12-021-5/+3
| | | | Remove a stale comment from bpf_validate().
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Quick fix for breakage of bounds checking in rev.1.12. Only onebde1999-07-041-2/+2
| | | | | | | | | of the additional checks in rev.1.12 was wrong. The others are a bit inconsistent and are probably unnecessarily pessimal. Checking for overflow of addition, if necessary at all, should be done in bpf_validate(). PR: 12484
* Break long lines that I introduced in a previous commit.eivind1999-04-111-4/+7
|
* Propagate unsignedness to all variants of 'k', and reorganize theeivind1998-12-071-24/+38
| | | | | | | | conditionals to be fully resistent against overflow in unsigned computations. Potential problem pointed out by: bde Reviewed by: bde
* Remove guard for < 0 on an unsigned variable.eivind1998-12-071-2/+2
|
* * Use explicitly sized types for grovelling around inside packets.dfr1998-10-311-21/+21
| | | | | | * On the alpha, make sure memory accesses are only made to aligned boundaries. Submitted by: Alex Nash <nash@mcs.net>
* Removed unused #includes.bde1997-08-021-3/+1
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Completed function declarations and/or added prototypes.bde1995-12-021-1/+4
|
* Remove trailing whitespace.rgrimes1995-05-301-18/+18
|
* Patch from Greg Ansley:dg1995-04-011-5/+5
| | | | | | | | | | In rare cases, when the filter specified accesses an multi-byte value that is split across mbuf's, the value loaded is incorrect. And if you are very unlucky (like me) it will index off the end of the mbuf and into an unallocated page and panic the system. If you look at the code you will discover the the index *k* is added to the pointer *cp* and the used AGAIN as a subscript.
* Added $Id$dg1994-08-021-2/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-5/+2
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+548
OpenPOWER on IntegriCloud