From Nicolas Dade <ndade@nsd.dyndns.org>: the VLAN tag is in the lower
12 bits of the VLAN field - check only those bits, not the priority or CFI flag.
This commit is contained in:
parent
4017783b36
commit
2ae5a9fc8c
1
CREDITS
1
CREDITS
|
@ -59,6 +59,7 @@ Additional people who have contributed patches:
|
||||||
Martin Husemann <martin@netbsd.org>
|
Martin Husemann <martin@netbsd.org>
|
||||||
Mike Wiacek <mike@iroot.net>
|
Mike Wiacek <mike@iroot.net>
|
||||||
Monroe Williams <monroe@pobox.com>
|
Monroe Williams <monroe@pobox.com>
|
||||||
|
Nicolas Dade <ndade@nsd.dyndns.org>
|
||||||
Octavian Cerna <tavy@ylabs.com>
|
Octavian Cerna <tavy@ylabs.com>
|
||||||
Olaf Kirch <okir@caldera.de>
|
Olaf Kirch <okir@caldera.de>
|
||||||
Onno van der Linden <onno@simplex.nl>
|
Onno van der Linden <onno@simplex.nl>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] _U_ =
|
static const char rcsid[] _U_ =
|
||||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.208 2004-08-18 14:25:02 hannes Exp $ (LBL)";
|
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.209 2004-08-27 07:37:10 guy Exp $ (LBL)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -5283,7 +5283,7 @@ gen_vlan(vlan_num)
|
||||||
if (vlan_num >= 0) {
|
if (vlan_num >= 0) {
|
||||||
struct block *b1;
|
struct block *b1;
|
||||||
|
|
||||||
b1 = gen_cmp(orig_nl, BPF_H, (bpf_int32)vlan_num);
|
b1 = gen_mcmp(orig_nl, BPF_H, (bpf_int32)vlan_num, 0x0fff);
|
||||||
gen_and(b0, b1);
|
gen_and(b0, b1);
|
||||||
b0 = b1;
|
b0 = b1;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue