]> The Tcpdump Group git mirrors - tcpdump/commitdiff
MEDSA: Address a Coverity warning
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 28 Apr 2015 12:33:33 +0000 (14:33 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 28 Apr 2015 12:36:01 +0000 (14:36 +0200)
print-medsa.c

index 29603c8084b4f5861ef1ddd6405556e604f3366d..dbdf356bf913e1cef848340dec3e88e120977346 100644 (file)
@@ -168,7 +168,11 @@ medsa_print(netdissect_options *ndo,
                                          ether_type),
                                  ether_type));
 
-               ethertype_print(ndo, ether_type, bp, length, caplen);
+               if (ethertype_print(ndo, ether_type, bp, length, caplen) == 0) {
+                       /* ether_type not known, print raw packet */
+                       if (!ndo->ndo_suppress_default_print)
+                               ND_DEFAULTPRINT(bp, caplen);
+               }
        }
        return;
 trunc: