From: guy Date: Wed, 13 Sep 2006 07:04:07 +0000 (+0000) Subject: Propagate from the main branch: X-Git-Tag: libpcap-0.9.5~5 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/dd84e1c988fbde340555716277b5f9391dd8f11b Propagate from the main branch: revision 1.266 date: 2006-03-16 08:46:13 +0000; author: hannes; state: Exp; lines: +3 -5 use gen_linktype() rather than a plain gen_cmp() for creating the link-layer specific match code for MPLS packets --- diff --git a/gencode.c b/gencode.c index 81da02ef..3f864fdb 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.221.2.41 2006-09-13 07:02:15 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.42 2006-09-13 07:04:07 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -6427,13 +6427,11 @@ gen_mpls(label_num) case DLT_C_HDLC: /* fall through */ case DLT_EN10MB: - b0 = gen_cmp(OR_LINK, off_linktype, BPF_H, - (bpf_int32)ETHERTYPE_MPLS); + b0 = gen_linktype(ETHERTYPE_MPLS); break; case DLT_PPP: - b0 = gen_cmp(OR_LINK, off_linktype, BPF_H, - (bpf_int32)PPP_MPLS_UCAST); + b0 = gen_linktype(PPP_MPLS_UCAST); break; /* FIXME add other DLT_s ...