]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-pim.c
index 1e63062e88d93177886b3d1c21be733c912749d6..f2db8c7681655ba2b3a712e1a3e0129f0ba524c6 100644 (file)
@@ -137,7 +137,7 @@ static const struct tok pimv2_df_election_flag_values[] = {
 
 /*
  * XXX: We consider a case where IPv6 is not ready yet for portability,
- * but PIM dependent defintions should be independent of IPv6...
+ * but PIM dependent definitions should be independent of IPv6...
  */
 
 struct pim {
@@ -189,7 +189,6 @@ pimv1_join_prune_print(netdissect_options *ndo,
 
        if (len < sizeof(nd_ipv4))
                goto trunc;
-       ND_TCHECK_LEN(bp, sizeof(nd_ipv4));
        if (ndo->ndo_vflag > 1)
                ND_PRINT("\n");
        ND_PRINT(" Upstream Nbr: %s", GET_IPADDR_STRING(bp));
@@ -218,13 +217,11 @@ pimv1_join_prune_print(netdissect_options *ndo,
                 */
                if (len < 4)
                        goto trunc;
-               ND_TCHECK_LEN(bp, sizeof(nd_ipv4));
                ND_PRINT("\n\tGroup: %s", GET_IPADDR_STRING(bp));
                bp += 4;
                len -= 4;
                if (len < 4)
                        goto trunc;
-               ND_TCHECK_LEN(bp, sizeof(nd_ipv4));
                if (GET_BE_U_4(bp) != 0xffffffff)
                        ND_PRINT("/%s", GET_IPADDR_STRING(bp));
                bp += 4;
@@ -259,7 +256,6 @@ pimv1_join_prune_print(netdissect_options *ndo,
        return;
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 void
@@ -303,13 +299,11 @@ pimv1_print(netdissect_options *ndo,
                          GET_IPADDR_STRING(bp + 24));
                break;
        case PIMV1_TYPE_REGISTER_STOP:
-               ND_TCHECK_LEN(bp + 12, sizeof(nd_ipv4));
                ND_PRINT(" for %s > %s", GET_IPADDR_STRING(bp + 8),
                          GET_IPADDR_STRING(bp + 12));
                break;
        case PIMV1_TYPE_RP_REACHABILITY:
                if (ndo->ndo_vflag) {
-                       ND_TCHECK_2(bp + 22);
                        ND_PRINT(" group %s", GET_IPADDR_STRING(bp + 8));
                        if (GET_BE_U_4(bp + 12) != 0xffffffff)
                                ND_PRINT("/%s", GET_IPADDR_STRING(bp + 12));
@@ -318,7 +312,6 @@ pimv1_print(netdissect_options *ndo,
                }
                break;
        case PIMV1_TYPE_ASSERT:
-               ND_TCHECK_LEN(bp + 16, sizeof(nd_ipv4));
                ND_PRINT(" for %s > %s", GET_IPADDR_STRING(bp + 16),
                          GET_IPADDR_STRING(bp + 8));
                if (GET_BE_U_4(bp + 12) != 0xffffffff)
@@ -344,7 +337,6 @@ pimv1_print(netdissect_options *ndo,
 
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 /*
@@ -410,7 +402,6 @@ cisco_autorp_print(netdissect_options *ndo,
 
                if (len < 4)
                        goto trunc;
-               ND_TCHECK_4(bp);
                ND_PRINT(" RP %s", GET_IPADDR_STRING(bp));
                bp += 4;
                len -= 4;
@@ -457,7 +448,6 @@ cisco_autorp_print(netdissect_options *ndo,
 
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 void
@@ -468,9 +458,6 @@ pim_print(netdissect_options *ndo,
        uint8_t pim_typever;
 
        ndo->ndo_protocol = "pim";
-#ifdef notyet                  /* currently we see only version and type */
-       ND_TCHECK_1(pim->pim_rsv);
-#endif
 
        pim_typever = GET_U_1(pim->pim_typever);
        switch (PIM_VER(pim_typever)) {
@@ -913,7 +900,6 @@ pimv2_print(netdissect_options *ndo,
                ip = (const struct ip *)bp;
                switch (IP_V(ip)) {
                 case 0: /* Null header */
-                       ND_TCHECK_4(ip->ip_dst);
                        ND_PRINT("IP-Null-header %s > %s",
                                  GET_IPADDR_STRING(ip->ip_src),
                                  GET_IPADDR_STRING(ip->ip_dst));
@@ -1101,7 +1087,6 @@ pimv2_print(netdissect_options *ndo,
 
                                if (len < 2)
                                        goto trunc;
-                               ND_TCHECK_2(bp);
                                ND_PRINT(",holdtime=");
                                unsigned_relts_print(ndo,
                                                     GET_BE_U_2(bp));