From 2ae5a9fc8cd89a541ed87f8d87e9f6f3b8e67460 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 27 Aug 2004 07:37:10 +0000 Subject: [PATCH] From Nicolas Dade : the VLAN tag is in the lower 12 bits of the VLAN field - check only those bits, not the priority or CFI flag. --- CREDITS | 1 + gencode.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CREDITS b/CREDITS index 96fb485..adf0093 100644 --- a/CREDITS +++ b/CREDITS @@ -59,6 +59,7 @@ Additional people who have contributed patches: Martin Husemann Mike Wiacek Monroe Williams + Nicolas Dade Octavian Cerna Olaf Kirch Onno van der Linden diff --git a/gencode.c b/gencode.c index 15ecda2..e8c5fb0 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint 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 #ifdef HAVE_CONFIG_H @@ -5283,7 +5283,7 @@ gen_vlan(vlan_num) if (vlan_num >= 0) { 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); b0 = b1; }