]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isoclns.c
RADIUS: Rename a test with an invalid length
[tcpdump] / print-isoclns.c
index f506d4d9fadbb785d71939d877ee46f459c2d2a7..404f612892af0d088fda52ca67943b78d83237f6 100644 (file)
@@ -56,7 +56,7 @@
  * IS-IS is defined in ISO 10589.  Look there for protocol definitions.
  */
 
-#define SYSTEM_ID_LEN  MAC_ADDR_LEN
+#define SYSTEM_ID_LEN  MAC48_LEN
 #define NODE_ID_LEN     (SYSTEM_ID_LEN+1)
 #define LSP_ID_LEN      (SYSTEM_ID_LEN+2)
 
@@ -208,7 +208,7 @@ static const struct tok esis_option_values[] = {
     { ESIS_OPTION_SECURITY,        "Security" },
     { ESIS_OPTION_ES_CONF_TIME,    "ES Configuration Time" },
     { ESIS_OPTION_PRIORITY,        "Priority" },
-    { ESIS_OPTION_ADDRESS_MASK,    "Addressk Mask" },
+    { ESIS_OPTION_ADDRESS_MASK,    "Address Mask" },
     { ESIS_OPTION_SNPA_MASK,       "SNPA Mask" },
     { 0, NULL }
 };
@@ -613,7 +613,7 @@ static const struct tok isis_lsp_istype_values[] = {
 #define ISIS_PTP_ADJ_INIT 1
 #define ISIS_PTP_ADJ_DOWN 2
 
-static const struct tok isis_ptp_adjancey_values[] = {
+static const struct tok isis_ptp_adjacency_values[] = {
     { ISIS_PTP_ADJ_UP,    "Up" },
     { ISIS_PTP_ADJ_INIT,  "Initializing" },
     { ISIS_PTP_ADJ_DOWN,  "Down" },
@@ -1126,9 +1126,10 @@ clnp_print(netdissect_options *ndo,
 
         default:
             /* dump the PDU specific data */
-            if (length > ND_BYTES_BETWEEN(pptr, optr)) {
+            if (length > ND_BYTES_BETWEEN(optr, pptr)) {
                 ND_PRINT("\n\t  undecoded non-header data, length %u", length-li);
-                print_unknown_data(ndo, pptr, "\n\t  ", length - ND_BYTES_BETWEEN(pptr, optr));
+                print_unknown_data(ndo, pptr, "\n\t  ",
+                                   length - ND_BYTES_BETWEEN(optr, pptr));
             }
         }
 
@@ -1299,10 +1300,10 @@ esis_print(netdissect_options *ndo,
                pptr += netal;
                 li -= netal;
 
-               if (snpal == MAC_ADDR_LEN)
+               if (snpal == MAC48_LEN)
                        ND_PRINT("\n\t  SNPA (length: %u): %s",
                               snpal,
-                              GET_ETHERADDR_STRING(snpa));
+                              GET_MAC48_STRING(snpa));
                else
                        ND_PRINT("\n\t  SNPA (length: %u): %s",
                               snpal,
@@ -2888,12 +2889,12 @@ isis_print(netdissect_options *ndo,
            break;
        case ISIS_TLV_ISNEIGH:
            while (tlen != 0) {
-               if (tlen < MAC_ADDR_LEN)
+               if (tlen < MAC48_LEN)
                    goto tlv_trunc;
-                ND_TCHECK_LEN(tptr, MAC_ADDR_LEN);
-                ND_PRINT("\n\t      SNPA: %s", isis_print_id(ndo, tptr, MAC_ADDR_LEN));
-                tlen -= MAC_ADDR_LEN;
-                tptr += MAC_ADDR_LEN;
+                ND_TCHECK_LEN(tptr, MAC48_LEN);
+                ND_PRINT("\n\t      SNPA: %s", isis_print_id(ndo, tptr, MAC48_LEN));
+                tlen -= MAC48_LEN;
+                tptr += MAC48_LEN;
            }
            break;
 
@@ -3148,7 +3149,7 @@ isis_print(netdissect_options *ndo,
            tlv_ptp_adj = (const struct isis_tlv_ptp_adj *)tptr;
            if(tlen>=1) {
                ND_PRINT("\n\t      Adjacency State: %s (%u)",
-                      tok2str(isis_ptp_adjancey_values, "unknown", GET_U_1(tptr)),
+                      tok2str(isis_ptp_adjacency_values, "unknown", GET_U_1(tptr)),
                       GET_U_1(tptr));
                tlen--;
            }