Hi,
I open a PFRING with pfring_open(), enabled extended headers and then add
another interface to it with pfring_bind(). I see packets arriving on each
interface but when I use pfring_recv to get the packets the if_index field in
the extended_hdr always refers to the index of the interface passed in the
original pfring_open() call. Packets arriving on the pfring_bind() interface
get an incorrect if_index of the primary interface.
I traced the problem to this rather suspect line:
PF_RING/userland/lib/pfring.c:636
hdr->caplen = min_val(hdr->caplen, ring->caplen),
hdr->extended_hdr.if_index = ring->device_id;
What is the purpose of overriding the extended_hdr.if_index with the
ring->device_id here? The if_index is already filled in at this point and the
statement just changes it to the primary interface for all calls. The comma ','
here looks like the statement was relying on some side effect of the min_val()
macro that no longer works?
Is it save to just delete this assignment to if_index here?
Regards,
Denis
________________________________
The information contained in this message and any attachments is strictly
confidential and intended solely for the use of the intended recipient(s). The
copyright in this communication belongs to (HSD). This message and any
attachments are confidential and may be subject to legal or other professional
privilege. Any confidentiality or privilege is not waived or lost because this
e-mail has been sent to you by mistake. If you have received this transmission
in error, please notify HSD on +61 3 9875 5900 immediately and destroy all
copies of this e-mail. The contents of this email message may not be quoted,
copied, reproduced or published in part or in whole, without the written
authorisation of HSD.
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc