[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21992.1351723328@obiwan.sandelman.ca>
Date: Wed, 31 Oct 2012 18:42:08 -0400
From: Michael Richardson <mcr@...delman.ca>
To: netdev@...r.kernel.org, tcpdump-workers@...ts.tcpdump.org
cc: Ani Sinha <ani@...stanetworks.com>,
Francesco Ruggeri <fruggeri@...stanetworks.com>
Subject: Re: [tcpdump-workers] vlan tagged packets and libpcap breakage
>>>>> "Ani" == Ani Sinha <ani@...stanetworks.com> writes:
Ani> cc'ing netdev.
>> Do you think that the existance of this behaviour could be exposed in
>> sysctl, /proc/net or /sys equivalent (we still don't have /sys/net...)?
>> As a read only file that had a 0/1 in it?
Ani> yes, we definitely need a run time check. Whether this could be in the
Ani> form of a socket option or a /proc entry I don't know.
unsigned int netdev_8021q_inskb = 1;
...
{
.ctl_name = NET_CORE_8021q_INSKB,
.procname = "netdev_8021q_inskb",
.data = &netdev_8021q_inskb,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = proc_dointvec
},
would seem to do it to me.
Then pcap can fopen("/proc/sys/net/core/netdev_8021q_inskb") and if it
finds it, and it is >0, then do the cmsg thing.
>> It sounds like it's impossible to capture all traffic now, and do vlan
>> filtering later on?
Ani> pcap files that already have the tags reinsrted should work with
Ani> current filter code. However for live traffic, one has to get the tags
Ani> from CMSG() and then reinsert it back to the packet for the current
Ani> filter to work. This is slow.
I think that this better vlan handling will be much faster, and make
things much more consistent between systems with and without hardware
offload, so it's great news.
However, a number of people use Linux machines to do traffic captures of various
kinds using interfaces dedicated to that purpose.
It would be nice if there was a way to get the packet "whole", such as
by having a second PACKET_CAPTURE point, which was before the adjustment
of the vlan. (obviously, if you had hardware, you'd want to turn that
off)
Many would like this capture point to actually eat all packets for the
interfaces it was defined for, as people doing captures never want those
packets going up the stack.
--
] He who is tired of Weird Al is tired of life! | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] mcr@...delman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
then sign the petition.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists