]> The Tcpdump Group git mirrors - libpcap/commitdiff
Propagate from the main branch:
authorguy <guy>
Wed, 13 Sep 2006 07:04:07 +0000 (07:04 +0000)
committerguy <guy>
Wed, 13 Sep 2006 07:04:07 +0000 (07:04 +0000)
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

gencode.c

index 81da02ef76d26ac90b0ba96c1c30fe6b0ed8e389..3f864fdba1b6655007e5ef84b708bf4fd941bf6c 100644 (file)
--- 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 ...