-
Notifications
You must be signed in to change notification settings - Fork 864
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
first hit packet never call callback #1254
Comments
in a addition, change |
and if handlep->filter_in_userland = 1
this code always return 0, so never call below callback. |
In my quick test this problem does not reproduce. In particular, I used CentOS 7.5 from here without any updates (kernel 3.10.0-862), then git-cloned the latest libpcap and tcpdump, then built the tcpdump snapshot with the libpcap snapshot, then ran the compiled tcpdump with Could you provide complete and detailed steps to reproduce the problem in addition to the code analysis? |
If that code returns 0, it's because |
it is wired, happened to project of company, the last change i do is that modify device.name = "any" so that can capture packet of any net adapter , and then this wired problem come up. i write a demo nothing happened like this. i have to change the code to fix up my problem.
|
Steps to reproduce the problem please. |
Closing due to lack of reporter's feedback. |
version: lastest
env: centos 7.5
problem: use libpcap ,and first bpf hit of net behavoir never call callback function,
i found the regular problem,
just in pcap_linux.c
pcap_read_linux_mmap_v3
this variate “handlep->filter_in_userland“ always equal 1 util packet hit and pcap_read_linux_mmap_v3 call , it changes to 0,
The text was updated successfully, but these errors were encountered: