]> The Tcpdump Group git mirrors - libpcap/commitdiff
Catch the case in "gen_mpls()" where "orig_nl" isn't -1, meaning
authorguy <guy>
Thu, 15 Jul 2004 00:08:06 +0000 (00:08 +0000)
committerguy <guy>
Thu, 15 Jul 2004 00:08:06 +0000 (00:08 +0000)
somebody's already used "vlan" or "mpls".

gencode.c

index d9243896bf00b6ecac57a5c9b6efb84411d0023c..16ef9e98fd01155f251466d89f1a5f258660d610 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.206 2004-06-16 08:29:33 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.207 2004-07-15 00:08:06 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -5332,6 +5332,9 @@ gen_mpls(label_num)
                                  linktype);
                        /*NOTREACHED*/
                }
+       } else {
+               bpf_error("'mpls' can't be combined with 'vlan' or another 'mpls'");
+               /*NOTREACHED*/
        }
 
        /* If a specific MPLS label is requested, check it */