From: guy Date: Thu, 15 Jul 2004 00:08:06 +0000 (+0000) Subject: Catch the case in "gen_mpls()" where "orig_nl" isn't -1, meaning X-Git-Tag: libpcap-0.9.1~161 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/fa90431b103af660a314e9552da7b57e16105749 Catch the case in "gen_mpls()" where "orig_nl" isn't -1, meaning somebody's already used "vlan" or "mpls". --- diff --git a/gencode.c b/gencode.c index d9243896..16ef9e98 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.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 */