Age | Commit message (Collapse) | Author |
|
Instead, keep the proc pointer in it and put the selinfo on a list
in struct proc in selrecord. Then clean up the list when leaving
sys_select and sys_poll.
miod@ ok, testing by many, including Bobs spamd boxes.
|
|
Previously the descriptor was locked only after
an interface is set, leading to a race condition.
Reported by Jon Steel < jon.steel at esentire com >
tested by otto@, looks correct deraadt@
|
|
code. however, it is still cluttering up the kernel namespace a bit. it is
better gone.
ok claudio@
|
|
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
|
|
the remainder of the network stack from splimp to splnet.
ok miod@
|
|
bpf FILDROP interface exists for about one year but the required
interface to the drivers was missing - so it was useless. this new
approach based on a design by henning@ uses a new mbuf flag to mark
filtered packets and to drop them in the generic network stack input
routines (like ether_input).
for example; after some additional testing, this could be used by
dhclient to filter everything except DHCP packets (track tech@
for a corresponding dhclient diff). the "filter dropped" packets won't
reach the network stack. so it's probably some kind of a very basic
application layer packet filter ;).
ok canacar@, discussed with henning@ and others
|
|
to bpf with either an address family or other header added.
These helpers only allocate a much smaller struct m_hdr on the stack when
needed, rather than leaving 256 byte struct mbufs on the stack in deep
call paths. Also removes a fair bit of duplicated code.
commit now, tune after deraadt@
|
|
IEEE802_11_RADIO data link types.
ok canacar@ damien@
|
|
fine deraadt@
|
|
ok canacar@, fgsch@, tested by some other people
|
|
consistent style in sys/net/bpf.c.
ok henning@, "looks fine" canacar@
|
|
ok mcbride@
|
|
by default label.
- fill in kn_data with the number of bytes available, same
behavior as FreeBSD/NetBSD.
ok tedu@
|
|
interface. Where the most common DLT is the one with the smallest id.
This fixes tcpdump for atw(4) that attaches multiple bpf hooks.
Tested: millert@, Sigfred Haversen, otto@, mcbride@, sturm@, krw@,
Steve Shockley
OK millert@ deraadt@
|
|
|
|
When enabled, it notifies the calling interface that the packet
matches a bpf filter and should be dropped.
ok henning@ markus@ frantzen@
|
|
|
|
|
|
Now to have more bpf devices just add device nodes in /dev,
no need to recompile kernel anymore.
Code from form@pdp-11.org.ru, some help from markus@.
ok markus@ canacar@ deraadt@
|
|
interface is detached, and wakeup any polling processes when the
bpf descriptor is closed. ok henning@, tedu@
|
|
while asleep in read. ok deraadt@
|
|
ok canacar@ deraadt@ mcbride@
|
|
max size goes to 2MB, default goes to 32k. ok canacar@ mcbride@
|
|
|
|
problems with dhcp.
ok frantzen@ krw@ deraadt@
|
|
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@
|
|
none of us can test this, but that does not mean it has to sit in the pr
database
|
|
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
|
|
markus ok. miod/paul confirmed
|
|
to userland instead.
fixes PRs 2235, 2236 and 2640
from Otto Moerbeek <otto@drijf.net>
ok frantzen@, tedu@, deraadt@
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
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
|
|
|
|
|
|
|
|
portability
|
|
(the previous priority didn't help performance in tests on a hacked
up BPF and it weighed down the load average)
|
|
|
|
source address in forged frames. from NetBSD. art@ok
|
|
|
|
at detach time when if_detach_ioctl() has been installed for an outgoing
interface and does not represent an error.
|
|
|
|
|
|
|
|
there but relying on an indirect inclusion
|
|
|
|
in preparation for softc retainment.
|
|
|
|
other families than inet.
|
|
|