]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sunatm.c
TCP: Add a test with data in the RST segment
[tcpdump] / print-sunatm.c
index 82835ae631e03008433e93811af07293f0873f00..0fe5eee8e411b5f281cf1fc6baef6ae5176a1b03 100644 (file)
@@ -71,8 +71,6 @@ sunatm_if_print(netdissect_options *ndo,
        u_int traftype;
 
        ndo->ndo_protocol = "sunatm";
-       ND_TCHECK_LEN(p, PKT_BEGIN_POS);
-       ndo->ndo_ll_hdr_len += PKT_BEGIN_POS;
 
        if (ndo->ndo_eflag) {
                ND_PRINT(GET_U_1(p + DIR_POS) & 0x80 ? "Tx: " : "Rx: ");
@@ -93,11 +91,12 @@ sunatm_if_print(netdissect_options *ndo,
                break;
        }
 
-       vci = GET_BE_U_2(p + VCI_POS);
        vpi = GET_U_1(p + VPI_POS);
+       vci = GET_BE_U_2(p + VCI_POS);
 
        p += PKT_BEGIN_POS;
        caplen -= PKT_BEGIN_POS;
        length -= PKT_BEGIN_POS;
+       ndo->ndo_ll_hdr_len += PKT_BEGIN_POS;
        atm_print(ndo, vpi, vci, traftype, p, length, caplen);
 }