Follow-up Comment #2, patch #6851 (project hurd):
The packet delivered from gnumach should have the packet header. NPF returns
the packet_header and pfinet always assumes that the packet from gnumach has
the packet_header.
For your first question, the return value of net_do_filter is boolean, i.e.,
it can only be passed or not passed, but bpf_do_filter returns the size of the
data that passes the filter.
bpf_do_filter(infp, net_kmsg(kmsg)->packet + sizeof(struct packet_header),
count, net_kmsg(kmsg)->header, ifp->if_header_size, &hash_headp, &entp) is
simply wrong because the length of the packet data passed to bpf_do_filter
isn't 'count' any more.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?6851>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/