Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-17 Thread Guy Harris
On Dec 17, 2012, at 1:50 AM, David Laight david.lai...@aculab.com wrote: How are you going to tell whether a feature is present in a non-Linux kernel ? The Linux memory-mapped capture mechanism is not present in a non-Linux kernel, so all the libpcap work involved here would, if necessary on

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-17 Thread Daniel Borkmann
On Mon, Dec 17, 2012 at 11:35 AM, Guy Harris g...@alum.mit.edu wrote: On Dec 17, 2012, at 1:50 AM, David Laight david.lai...@aculab.com wrote: How are you going to tell whether a feature is present in a non-Linux kernel ? The Linux memory-mapped capture mechanism is not present in a

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-17 Thread Ani Sinha
On Mon, Dec 17, 2012 at 2:35 AM, Guy Harris g...@alum.mit.edu wrote: On Dec 17, 2012, at 1:50 AM, David Laight david.lai...@aculab.com wrote: How are you going to tell whether a feature is present in a non-Linux kernel ? The Linux memory-mapped capture mechanism is not present in a

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-13 Thread Daniel Borkmann
On 12/12/2012 10:53 PM, Ani Sinha wrote: unsigned int netdev_8021q_inskb = 1; ... { .ctl_name = NET_CORE_8021q_INSKB, .procname = netdev_8021q_inskb, .data = netdev_8021q_inskb, .maxlen =

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-13 Thread Daniel Borkmann
On Thu, Dec 13, 2012 at 6:34 PM, Ani Sinha a...@aristanetworks.com wrote: On Thu, Dec 13, 2012 at 12:35 AM, Daniel Borkmann dbork...@redhat.com wrote: On 12/12/2012 10:53 PM, Ani Sinha wrote: unsigned int netdev_8021q_inskb = 1; ... { .ctl_name =

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-13 Thread Ani Sinha
On Thu, Dec 13, 2012 at 1:49 PM, Daniel Borkmann danborkm...@iogearbox.net wrote: Well, not everyone on netdev might be following this thread (resp. following fully). The best way to get responses for a patch is to go through the normal patch submission process on netdev, and if you like to

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-12 Thread Ani Sinha
unsigned int netdev_8021q_inskb = 1; ... { .ctl_name = NET_CORE_8021q_INSKB, .procname = netdev_8021q_inskb, .data = netdev_8021q_inskb, .maxlen = sizeof(int), .mode =

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-12 Thread Ani Sinha
+ Eric B. On Wed, Dec 12, 2012 at 1:53 PM, Ani Sinha a...@aristanetworks.com wrote: unsigned int netdev_8021q_inskb = 1; ... { .ctl_name = NET_CORE_8021q_INSKB, .procname = netdev_8021q_inskb, .data =

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-11 Thread Ani Sinha
It is possible to test for the presence of support of the new vlan bpf extensions by attempting to load a filter that uses them. As only valid filters can be loaded, old kernels that do not support filtering of vlan tags will fail to load the a test filter with uses them. Unfortunately I do

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-11 Thread Ani Sinha
On Tue, Dec 11, 2012 at 3:04 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Tue, 2012-12-11 at 14:36 -0800, Ani Sinha wrote: It is possible to test for the presence of support of the new vlan bpf extensions by attempting to load a filter that uses them. As only valid filters can be

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-11 Thread Ani Sinha
On Tue, Dec 11, 2012 at 3:04 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Tue, 2012-12-11 at 14:36 -0800, Ani Sinha wrote: It is possible to test for the presence of support of the new vlan bpf If you want to test ANCILLARY possible values, its already too late, as old kernels wont

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-10 Thread Ani Sinha
...@aristanetworks.com Subject: Re: [tcpdump-workers] vlan tagged packets and libpcap breakage Eric == Eric W Biederman ebied...@xmission.com writes: Eric It is a bit odd that you are indenting with spaces instead of tabs Eric in a file that is indented with tab. Again libpcap isn't my code

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Ani Sinha
On Wed, Oct 31, 2012 at 5:50 PM, Guy Harris g...@alum.mit.edu wrote: On Oct 31, 2012, at 3:35 PM, Ani Sinha a...@aristanetworks.com wrote: yes but if the packet is passed to the filter within libpcap (when we are not using the kernel filter) before the reinsertion, ...that would be a bug.

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Eric W. Biederman
Ani Sinha a...@aristanetworks.com writes: On Sat, Nov 17, 2012 at 3:33 PM, Eric W. Biederman ebied...@xmission.com wrote: the vlan header in packets as we receive them. The code is correct except for the case of packets in vlan 0. Currently the packet reconstruction is ambiguous. The most

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Ani Sinha
On Thu, Dec 6, 2012 at 2:19 PM, Eric W. Biederman ebied...@xmission.com wrote: Ani Sinha a...@aristanetworks.com writes: On Sat, Nov 17, 2012 at 3:33 PM, Eric W. Biederman ebied...@xmission.com wrote: the vlan header in packets as we receive them. The code is correct except for the case of

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Ani Sinha
On Thu, Dec 6, 2012 at 2:19 PM, Eric W. Biederman ebied...@xmission.com wrote: Ani Sinha a...@aristanetworks.com writes: May be this? Two things. - TP_STATUS_VLAN_VALID lives in the tp_status field not the tp_vlan_tci field. - To work on older kernels with binaries compiled with newer

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Eric W. Biederman
Ani Sinha a...@aristanetworks.com writes: On Thu, Dec 6, 2012 at 2:19 PM, Eric W. Biederman ebied...@xmission.com wrote: Ani Sinha a...@aristanetworks.com writes: May be this? Two things. - TP_STATUS_VLAN_VALID lives in the tp_status field not the tp_vlan_tci field. - To work on

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Ani Sinha
The patch is whitespace damaged. And one of your test is using || instead of OK, using alpine now :-) The test should be not ||. aargh! I am retarded! Fixed. Hopefully 3rd time is a charm :-) ani pcap-linux.c | 50 +++--- 1 files

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Ani Sinha
The patch is whitespace damaged. And one of your test is using || instead of OK, using alpine now :-) The test should be not ||. aargh! I am retarded! Fixed. Hopefully 3rd time is a charm :-) ani pcap-linux.c | 50 +++--- 1 files changed,

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Eric W. Biederman
Ani Sinha a...@aristanetworks.com writes: The patch is whitespace damaged. And one of your test is using || instead of OK, using alpine now :-) The test should be not ||. aargh! I am retarded! Fixed. Hopefully 3rd time is a charm :-) Acked-by: Eric W. Biederman ebied...@xmission.com

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-12-06 Thread Michael Richardson
Eric == Eric W Biederman ebied...@xmission.com writes: Eric It is a bit odd that you are indenting with spaces instead of tabs Eric in a file that is indented with tab. Again libpcap isn't my code so I Eric don't care but someone else might. tabs are hysterical raisens. Send two

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-18 Thread Eric W. Biederman
Ani Sinha a...@aristanetworks.com writes: cc'ing netdev. On Wed, Oct 31, 2012 at 2:01 PM, Michael Richardson m...@sandelman.ca wrote: Thanks for this email. Ani == Ani Sinha a...@aristanetworks.com writes: Ani remove inline from vlan_core.c functions Ani Signed-off-by: David S.

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-18 Thread Daniel Borkmann
On Sat, Nov 17, 2012 at 11:14 PM, Michael Richardson m...@sandelman.ca wrote: Thank you for this reply. Eric == Eric W Biederman ebied...@xmission.com writes: Eric I don't see any need to add any kernel code to allow checking Eric if vlan tags are stripped. Vlan headers are stripped

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-18 Thread Eric W. Biederman
Michael Richardson m...@sandelman.ca writes: Thank you for this reply. Eric == Eric W Biederman ebied...@xmission.com writes: Eric I don't see any need to add any kernel code to allow checking Eric if vlan tags are stripped. Vlan headers are stripped on all Eric kernel

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-18 Thread Eric W. Biederman
Daniel Borkmann danborkm...@iogearbox.net writes: Speaking of netsniff-ng where we don't reconstruct VLAN headers, users have reported that depending on the NIC/driver resp. ethtool setting, they can come in stripped or not (in the pf_packet's rx_ring buffer). However, I assume VLAN AUXDATA

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-14 Thread Michael Richardson
Ani == Ani Sinha a...@aristanetworks.com writes: Ani I'm wondering if there has been any progress on this. Are there Ani any thoughts on what Bill wrote in his email? I don't think so. Do you have time? ___ tcpdump-workers mailing list

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-13 Thread Ani Sinha
Folks, I'm wondering if there has been any progress on this. Are there any thoughts on what Bill wrote in his email? Thanks ani On Fri, Nov 2, 2012 at 9:13 AM, Bill Fenner fen...@gmail.com wrote: On Wed, Oct 31, 2012 at 6:20 PM, Guy Harris g...@alum.mit.edu wrote: On Oct 31, 2012, at

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-13 Thread Ani Sinha
Folks, I'm wondering if there has been any progress on this. Are there any thoughts on what Bill wrote in his email? Thanks On Tue, Nov 13, 2012 at 2:41 PM, Ani Sinha a...@aristanetworks.com wrote: Folks, I'm wondering if there has been any progress on this. Are there any thoughts on what

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-11 Thread Bill Fenner
On Wed, Oct 31, 2012 at 6:20 PM, Guy Harris g...@alum.mit.edu wrote: On Oct 31, 2012, at 2:50 PM, Ani Sinha a...@aristanetworks.com wrote: pcap files that already have the tags reinsrted should work with current filter code. However for live traffic, one has to get the tags from CMSG() and

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-11-01 Thread Guy Harris
On Oct 31, 2012, at 2:50 PM, Ani Sinha a...@aristanetworks.com wrote: pcap files that already have the tags reinsrted should work with current filter code. However for live traffic, one has to get the tags from CMSG() and then reinsert it back to the packet for the current filter to work.

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-10-31 Thread Ani Sinha
cc'ing netdev. On Wed, Oct 31, 2012 at 2:01 PM, Michael Richardson m...@sandelman.ca wrote: Thanks for this email. Ani == Ani Sinha a...@aristanetworks.com writes: Ani remove inline from vlan_core.c functions Ani Signed-off-by: David S. Miller da...@davemloft.net Ani As a

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-10-31 Thread Ani Sinha
On Wed, Oct 31, 2012 at 3:20 PM, Guy Harris g...@alum.mit.edu wrote: On Oct 31, 2012, at 2:50 PM, Ani Sinha a...@aristanetworks.com wrote: pcap files that already have the tags reinsrted should work with current filter code. However for live traffic, one has to get the tags from CMSG() and

Re: [tcpdump-workers] vlan tagged packets and libpcap breakage

2012-10-31 Thread Ani Sinha
On Wed, Oct 31, 2012 at 5:50 PM, Guy Harris g...@alum.mit.edu wrote: On Oct 31, 2012, at 3:35 PM, Ani Sinha a...@aristanetworks.com wrote: yes but if the packet is passed to the filter within libpcap (when we are not using the kernel filter) before the reinsertion, ...that would be a bug.