]> The Tcpdump Group git mirrors - libpcap/commitdiff
If the user specifies an Ethernet address in an expression such as
authorguy <guy>
Tue, 12 Dec 2000 08:08:38 +0000 (08:08 +0000)
committerguy <guy>
Tue, 12 Dec 2000 08:08:38 +0000 (08:08 +0000)
"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.

gencode.c

index 13d17b64f62104377fb4ee88de83530c80140466..5ce6da56380e8adff0368f05c95c683d731b125c 100644 (file)
--- 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 */