From: guy Date: Tue, 12 Dec 2000 08:08:38 +0000 (+0000) Subject: If the user specifies an Ethernet address in an expression such as X-Git-Tag: libpcap-0.6.1~30 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/e20bbc40f78e45fb4ab53eb03323392248fe1944 If the user specifies an Ethernet address in an expression such as "ether host XX:XX:XX:XX:XX:XX", but the device on which you're capturing isn't a device with Ethernet-style link-layer addresses, report "ethernet addresses supported only on ethernet, FDDI or token ring", not "ethernet address used in non-ether expression", as the error. --- diff --git a/gencode.c b/gencode.c index 13d17b64..5ce6da56 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.137 2000-12-12 03:26:16 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.138 2000-12-12 08:08:38 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -2631,6 +2631,7 @@ gen_ecode(eaddr, q) return gen_fhostop(eaddr, (int)q.dir); if (linktype == DLT_IEEE802) return gen_thostop(eaddr, (int)q.dir); + bpf_error("ethernet addresses supported only on ethernet, FDDI or token ring"); } bpf_error("ethernet address used in non-ether expression"); /* NOTREACHED */