|
|||||||||||
|
Re: Stripping VLAN tags
From: Anil Madhavapeddy <anil(at)recoil.org>
Date: Fri Jul 11 2003 - 11:36:10 EDT
On Fri, Jul 11, 2003 at 09:23:05AM -0500, Glenn E. Bailey III wrote:
I don't know if there's a supported way of doing this, but if you are not using hardware VLAN tagging, there's a completely untested patch you could try that breaks normal VLAN support. It just removes the check for which tag is bound to a vlan interface in the input code, so if you bind a single vlan(4) interface to your sniffing device, it should see all the traffic with the tags stripped off. Others with more clue than me may correct this :) Index: if_vlan.c RCS file: /cvs/src/sys/net/if_vlan.c,v retrieving revision 1.38
diff -u -r1.38 if_vlan.c
--- if_vlan.c 13 May 2003 00:55:12 -0000 1.38
+++ if_vlan.c 11 Jul 2003 15:32:36 -0000
@@ -244,7 +244,7 @@
t = EVL_VLANOFTAG(t);
for (i = 0; i < nifvlan; i++) {
ifv = &ifv_softc[i];
- if (m->m_pkthdr.rcvif == ifv->ifv_p && t == ifv->ifv_tag)
+ if (m->m_pkthdr.rcvif == ifv->ifv_p)
break;
}
@@ -319,7 +319,7 @@
for (i = 0; i < nifvlan; i++) {
ifv = &ifv_softc[i];
- if (m->m_pkthdr.rcvif == ifv->ifv_p && tag == ifv->ifv_tag)
+ if (m->m_pkthdr.rcvif == ifv->ifv_p)
break;
}
--
Anil Madhavapeddy
http://anil.recoil.org
University of Cambridge
http://www.cl.cam.ac.uk
Received on Fri Jul 11 11:56:09 2003This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:42 EDT |
||||||||||
|
|||||||||||