]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-l2tp.c
Use nd_ types, add EXTRACT_ calls.
[tcpdump] / print-l2tp.c
index 6cf0c0adfb1104c17b0d51b69071008913984bfd..d900caa3741183970c28e4aa178b6b8621ed1cf0 100644 (file)
@@ -605,7 +605,7 @@ l2tp_avp_print(netdissect_options *ndo, const u_char *dat, int length)
 
        ND_PRINT((ndo, " "));
 
-       ND_TCHECK(*ptr);        /* Flags & Length */
+       ND_TCHECK_2(ptr);       /* Flags & Length */
        len = EXTRACT_BE_U_2(ptr) & L2TP_AVP_HDR_LEN_MASK;
 
        /* If it is not long enough to contain the header, we'll give up. */
@@ -619,7 +619,7 @@ l2tp_avp_print(netdissect_options *ndo, const u_char *dat, int length)
 
        /* If it goes past the end of the remaining length of the captured
           data, we'll give up. */
-       ND_TCHECK2(*ptr, len);
+       ND_TCHECK_LEN(ptr, len);
 
        /*
         * After this point, we don't need to check whether we go past