hi all,

pls find attached a bugfix in order to properly
assert the checksum TLV #12 for artifically
long, and hence stripped frames; 

/hannes

Index: print-isoclns.c
===================================================================
RCS file: /tcpdump/master/tcpdump/print-isoclns.c,v
retrieving revision 1.34
diff -u -r1.34 print-isoclns.c
--- print-isoclns.c     2001/12/13 09:31:21     1.34
+++ print-isoclns.c     2001/12/17 01:35:19
@@ -152,9 +152,9 @@
 
 static struct tok isis_lsp_istype_values[] = {
        { ISIS_LSP_TYPE_UNUSED0,        "Unused 0x0 (invalid)"},
-       { ISIS_LSP_TYPE_LEVEL_1,        "Level 1 IS"},
+       { ISIS_LSP_TYPE_LEVEL_1,        "L1 IS"},
        { ISIS_LSP_TYPE_UNUSED2,        "Unused 0x2 (invalid)"},
-       { ISIS_LSP_TYPE_LEVEL_2,        "Level 2 IS"},
+       { ISIS_LSP_TYPE_LEVEL_2,        "L1L2 IS"},
        { 0, NULL }
 };
 
@@ -752,8 +752,10 @@
        }
 
        pdu_len=EXTRACT_16BITS(header_iih_lan->pdu_len);
-       if (packet_len>pdu_len)
+       if (packet_len>pdu_len) {
          packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
+         length=pdu_len;
+       }
 
        printf(", L%s Lan IIH (%u)",
               ISIS_MASK_LEVEL_BITS(pdu_type) ? "1" : "2",
@@ -797,8 +799,10 @@
        }
        
        pdu_len=EXTRACT_16BITS(header_iih_ptp->pdu_len);
-       if (packet_len>pdu_len)
+       if (packet_len>pdu_len) {
          packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
+         length=pdu_len;
+       }
        
        printf(", PTP IIH (%u)",pdu_len);
        TCHECK(*header_iih_ptp);
@@ -838,9 +842,11 @@
        }
        
        pdu_len=EXTRACT_16BITS(header_lsp->pdu_len);
-       if (packet_len>pdu_len)
+       if (packet_len>pdu_len) {
          packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
-       
+         length=pdu_len;
+       }
+
        if (pdu_type == L1_LSP) 
            printf(", L1 LSP (%u)",pdu_len);
        else if (pdu_type == L2_LSP)    
@@ -878,9 +884,11 @@
        }
        
        pdu_len=EXTRACT_16BITS(header_csnp->pdu_len);
-       if (packet_len>pdu_len)
+       if (packet_len>pdu_len) {
          packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
-       
+         length=pdu_len;
+       }
+
        printf(", L%s CSNP (%u)", ISIS_MASK_LEVEL_BITS(pdu_type) ? "2" : "1", pdu_len);
        TCHECK(*header_csnp);
        printf("\n\t\t  source-id:    ");
@@ -903,9 +911,11 @@
        }
 
        pdu_len=EXTRACT_16BITS(header_psnp->pdu_len);
-       if (packet_len>pdu_len)
+       if (packet_len>pdu_len) {
          packet_len=pdu_len; /* do TLV decoding as long as it makes sense */
-               
+         length=pdu_len;
+       }
+
        printf(", L%s PSNP (%u)", ISIS_MASK_LEVEL_BITS(pdu_type) ? "2" : "1", pdu_len);
        TCHECK(*header_psnp);
        printf("\n\t\t  source-id:    ");

Reply via email to