[BPF Read and Write] Strange behaviour?

Giampaolo Fresi Roglia gianz at security.dico.unimi.it
Tue May 20 06:20:50 PDT 2003


Hi all,
   I must access to bpf in order to rewrite network traffic from a
   device to another one in both directions; I open 2 bpf descriptors,
   one for every device I must use and I found a strange behaviour:
   when I try to write a packet to bpf, it seems to me the driver drops
   silently some packets, even if the buffer associated with bpf is not
   full.
   I tried my program on FreeBSD 4.7, 4.8 and 5.0 (RELEASE).
   FreeBSD 5.0 behaves correctly unlike 4.7 and 4.8.

   I wonder if I am wrong with something, or if I can use a workaround
   for this...

   I attach part of the code I used to access bpf...
   Thanks in advance.
-- 
Giampaolo Fresi Roglia       <gianz at security.dico.unimi.it>
GPG Key at http://security.dico.unimi.it/~gianz/gianz.gpg
CERT-IT   Computer Emergency Response Team ITaly
http://security.dico.unimi.it


More information about the freebsd-net mailing list