summaryrefslogtreecommitdiff
path: root/sys/net/bpf.c
AgeCommit message (Collapse)Author
2004-05-08reference count bpf descriptors to protect against disappearing interfacesCan Erkin Acar
while asleep in read. ok deraadt@
2004-02-24sysctl knob for bpf tunables. some tips from canacar@Ted Unangst
ok canacar@ deraadt@ mcbride@
2004-02-06as seen in netbsd. crank bpf sizes to adapt to faster networks.Ted Unangst
max size goes to 2MB, default goes to 32k. ok canacar@ mcbride@
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
2003-10-24Fix write filter blocking when no filter was set. FixesCan Erkin Acar
problems with dhcp. ok frantzen@ krw@ deraadt@
2003-10-22Add locking and write filtering to bpf descriptors.Can Erkin Acar
Locking prevents dangerous ioctls such as changing the interface and sending signals to be executed by an unprivileged process. A filter can also be applied to packets injected through a bpf descriptor. These features allow programs using bpf descriptors to safely drop/seperate privileges. ok frantzen@ henning@ mcbride@
2003-10-04bpf support for atm cards; from jason@ackley.netTheo de Raadt
none of us can test this, but that does not mean it has to sit in the pr database
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-07-29avoid stack smash on FDDI case. found by kernel propolice.Jun-ichiro itojun Hagino
markus ok. miod/paul confirmed
2003-06-18Do not panic on no memory available when allocating bufs, pass ENOBUFSHenning Brauer
to userland instead. fixes PRs 2235, 2236 and 2640 from Otto Moerbeek <otto@drijf.net> ok frantzen@, tedu@, deraadt@
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-01When using bpf(4) in immediate mode, and using kevent(2) to receiveArtur Grabowski
notification of packet arrival, the usermode application isn't notified until a second packet arrives. This is because KNOTE() calls filt_bpfread() before bd_slen has been updated with the newly arrived packet length, so it looks like there is no data there. Moving the bpf_wakeup() call for immediate mode to after bd_slen is set fixes it. From: wayne@epipe.com.au in pr 3175
2002-06-06kqueue support for bpf; okay markus@Niels Provos
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2001-10-02change timeval to bpf_timeval; 32 bit in size, permitting much greater ↵Theo de Raadt
portability
2001-09-15Revert the sleep priority to something more saneMike Frantzen
(the previous priority didn't help performance in tests on a hacked up BPF and it weighed down the load average)
2001-06-08Move ifpromisc() from bpf.c to if.c, include cleanup.Angelos D. Keromytis
2001-05-28add BIOC[GS]HDRCMPLT ioctl for BPF, to disable overwriting of link level ↵Dug Song
source address in forged frames. from NetBSD. art@ok
2001-05-16No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)Hakan Olsson
2001-04-04check for return value of ENODEV from ifpromisc(). This will happenJason Wright
at detach time when if_detach_ioctl() has been installed for an outgoing interface and does not represent an error.
2001-03-25Don't set pbp to point to free memory. Thanks to Dawson Engler and teamConstantine Sapuntzakis
2001-03-13allow configuring number of these in ukcMichael Shalayeff
2000-06-19de-#ifdef-izeJason Wright
2000-06-08Add explicit inclusions of signalvar.h to files actually using syms definedNiklas Hallqvist
there but relying on an indirect inclusion
2000-03-23Remove code from the stone age.Artur Grabowski
2000-02-19set interface fields to null when detaching substructuresNiklas Hallqvist
in preparation for softc retainment.
1999-08-10code we do not use, had a typo; sirsyko@temp.ishiboo.comTheo de Raadt
1999-08-08Support detaching of network interfaces. Still work to do in ipf, andNiklas Hallqvist
other families than inet.
1999-05-26Implement DLT_RAW, DLT_{SLIP,PPP}_BSDOS from libpcap 0.4Brad Smith
1999-04-22we don't need to include buf.hArtur Grabowski
1998-11-12crank BPF_BUFSIZE so that fddi frames fitTheo de Raadt
1998-06-26fix bpf select(); from mts@rare.netTheo de Raadt
1997-09-30Check for NULL argument in bpf_mtap(). Some ethernet driversTodd C. Miller
can call this with a NULL pointer, resulting in a panic. Matthias Scheler <tron@lyssa.owl.de>
1997-09-05make bpfread return ENXIO if a read is attempted on an uninitializedTheo de Raadt
descriptor; newsham@secnet.com
1997-08-31for non-tty TIOCSPGRP/F_SETOWN/FIOSETOWN pgid setting calls, store uidTheo de Raadt
and euid as well, then deliver them using new csignal() interface which ensures that pgid setting process is permitted to signal the pgid process(es). Thanks to newsham@aloha.net for extensive help and discussion.
1997-03-17Removed static specifiers. Align bpf headers on sizeof(long) boundariesNiklas Hallqvist
as it begins with a timeval struct. This fixes the alpha bpf panics. Removed double prototypes. Reordered includes. The last change came from NetBSD. Updated $NetBSD$ tags. Slight KNF too.
1997-02-12mark descriptors free in bpfilterattach() instead of bpfattach(); clearlyTheo de Raadt
must not re-marking them when new interfaces are added while one or more bpf channels are in use; my fix to netbsd pr#3189, Jean-Luc.Richier@imag.fr
1997-01-27select subsystem si_pid becomes si_selpid, to not conflict against ↵Theo de Raadt
user/kernel siginfo si_pid #define
1996-12-07avoid race, avoid mbuf leakTheo de Raadt
1996-06-18bpf BIOCSRTIMEOUT can round tv_usec down to zero & block; netbsd pr#2531; ↵Theo de Raadt
jhawk@mit.edu
1996-05-10if_name/if_unit -> if_xname/if_softcTheo de Raadt
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1995-10-18initial import of NetBSD treeTheo de Raadt