]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sll.c
Have print_llc() clear out the extracted_ethertype argument, rather than
[tcpdump] / print-sll.c
index 989583029fec455262c82e8eb808a61eaebda24c..d96b3de29ee208da72a24fb6bf70e9c12e5d4ecf 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.18 2005-07-07 01:22:21 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.19 2005-11-13 12:12:43 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -148,7 +148,6 @@ sll_if_print(const struct pcap_pkthdr *h, const u_char *p)
         * Is it (gag) an 802.3 encapsulation, or some non-Ethernet
         * packet type?
         */
-       extracted_ethertype = 0;
        if (ether_type <= ETHERMTU) {
                /*
                 * Yes - what type is it?
@@ -173,6 +172,9 @@ sll_if_print(const struct pcap_pkthdr *h, const u_char *p)
                        break;
 
                default:
+                       extracted_ethertype = 0;
+                       /*FALLTHROUGH*/
+
                unknown:
                        /* ether_type not known, print raw packet */
                        if (!eflag)