]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Ethernet: Fix indentation
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 18 May 2019 14:54:44 +0000 (16:54 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 23 May 2019 09:08:38 +0000 (11:08 +0200)
print-ether.c

index d7bc1b401b7f787f2ca57d00047c92d3876680bb..4f8caa971d6b04ee6bee007245eb0deff79a4c32 100644 (file)
@@ -303,34 +303,34 @@ recurse:
                        llc_hdrlen = -llc_hdrlen;
                }
                hdrlen += llc_hdrlen;
                        llc_hdrlen = -llc_hdrlen;
                }
                hdrlen += llc_hdrlen;
-               } else if (length_type == ETHERTYPE_ARISTA) {
-                       if (caplen < 2) {
-                               ND_PRINT("[|arista]");
-                               return (hdrlen + caplen);
-                       }
-                       if (length < 2) {
-                               ND_PRINT("[|arista]");
-                               return (hdrlen + length);
-                       }
-                       ether_type_print(ndo, length_type);
-                       ND_PRINT(", length %u: ", orig_length);
-                       int bytesConsumed = arista_print_ethertype(ndo, p, length);
-                       if (bytesConsumed > 0) {
-                               p += bytesConsumed;
-                               length -= bytesConsumed;
-                               caplen -= bytesConsumed;
-                               hdrlen += bytesConsumed;
-                               goto recurse;
-                       } else {
-                               /* subtype/version not known, print raw packet */
-                               if (!ndo->ndo_eflag && length_type > MAX_ETHERNET_LENGTH_VAL) {
-                                       ether_addresses_print(ndo, src.addr, dst.addr);
-                                       ether_type_print(ndo, length_type);
-                                       ND_PRINT(", length %u: ", orig_length);
-                               }
-                                if (!ndo->ndo_suppress_default_print)
-                                        ND_DEFAULTPRINT(p, caplen);
+       } else if (length_type == ETHERTYPE_ARISTA) {
+               if (caplen < 2) {
+                       ND_PRINT("[|arista]");
+                       return (hdrlen + caplen);
+               }
+               if (length < 2) {
+                       ND_PRINT("[|arista]");
+                       return (hdrlen + length);
+               }
+               ether_type_print(ndo, length_type);
+               ND_PRINT(", length %u: ", orig_length);
+               int bytesConsumed = arista_print_ethertype(ndo, p, length);
+               if (bytesConsumed > 0) {
+                       p += bytesConsumed;
+                       length -= bytesConsumed;
+                       caplen -= bytesConsumed;
+                       hdrlen += bytesConsumed;
+                       goto recurse;
+               } else {
+                       /* subtype/version not known, print raw packet */
+                       if (!ndo->ndo_eflag && length_type > MAX_ETHERNET_LENGTH_VAL) {
+                               ether_addresses_print(ndo, src.addr, dst.addr);
+                               ether_type_print(ndo, length_type);
+                               ND_PRINT(", length %u: ", orig_length);
                        }
                        }
+                        if (!ndo->ndo_suppress_default_print)
+                                ND_DEFAULTPRINT(p, caplen);
+               }
        } else {
                /*
                 * It's a type field with some other value.
        } else {
                /*
                 * It's a type field with some other value.