On Fri, Jan 11, 2002 at 07:53:08AM -0800, CJTT wrote: > > (using the ti and and also the bge drivers).... > with 4.5-PRERELEASE (cvs'upped two days ago), I've now lost > the ability to see the VLAN traffic on the main interface > (even with no VLAN in the kernel!)...so once again, > I've lost that loving feeling ;-( > > Is there anything I can do in stable that will allow > me to see the packets (incoming)? If not, what magic > will I have to perform in current that will do this? > > (Of course, if Luigi would add some simple link layer > counting or diverting capability to ipfw, that would > be ideal ;-) > > Thanks in advance....
This patch or something like it should work. -- Brooks Index: if_vlan.c =================================================================== RCS file: /usr/cvs/src/sys/net/if_vlan.c,v retrieving revision 1.36 diff -u -r1.36 if_vlan.c --- if_vlan.c 21 Nov 2001 20:29:08 -0000 1.36 +++ if_vlan.c 19 Dec 2001 01:42:10 -0000 @@ -401,6 +401,26 @@ { struct ifvlan *ifv; + /* + * Fake up a header and send the packet to the physical interface's + * bpf tap if active. + */ + if (m->m_pkthdr.rcvif->if_bpf != NULL) { + struct m_hdr mh; + struct ether_vlan_header evh; + + bcopy(eh, &evh, 2*ETHER_ADDR_LEN); + evh.evl_encap_proto = htons(ETHERTYPE_VLAN); + evh.evl_tag = htons(t); + evh.evl_proto = eh->ether_type; + + /* This kludge is OK; BPF treats the "mbuf" as read-only */ + mh.mh_next = m; + mh.mh_data = (char *)&evh; + mh.mh_len = ETHER_HDR_LEN + EVL_ENCAPLEN; + bpf_mtap(m->m_pkthdr.rcvif, (struct mbuf *)&mh); + } + for (ifv = LIST_FIRST(&ifv_list); ifv != NULL; ifv = LIST_NEXT(ifv, ifv_list)) { if (m->m_pkthdr.rcvif == ifv->ifv_p -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
msg04685/pgp00000.pgp
Description: PGP signature