X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3c8f3e13b03380742c24070f8a7b56fe12c6b8ee..da20bc56d6100b5275d6f85c4a25bac1dab4e57e:/print-frag6.c diff --git a/print-frag6.c b/print-frag6.c index 59b9dfef..fe8f3cf7 100644 --- a/print-frag6.c +++ b/print-frag6.c @@ -45,19 +45,19 @@ frag6_print(netdissect_options *ndo, register const u_char *bp, register const u if (ndo->ndo_vflag) { ND_PRINT((ndo, "frag (0x%08x:%d|%ld)", - EXTRACT_BE_32BITS(&dp->ip6f_ident), - EXTRACT_BE_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK, - sizeof(struct ip6_hdr) + EXTRACT_BE_16BITS(&ip6->ip6_plen) - + EXTRACT_BE_U_4(&dp->ip6f_ident), + EXTRACT_BE_U_2(&dp->ip6f_offlg) & IP6F_OFF_MASK, + sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(&ip6->ip6_plen) - (long)(bp - bp2) - sizeof(struct ip6_frag))); } else { ND_PRINT((ndo, "frag (%d|%ld)", - EXTRACT_BE_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK, - sizeof(struct ip6_hdr) + EXTRACT_BE_16BITS(&ip6->ip6_plen) - + EXTRACT_BE_U_2(&dp->ip6f_offlg) & IP6F_OFF_MASK, + sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(&ip6->ip6_plen) - (long)(bp - bp2) - sizeof(struct ip6_frag))); } /* it is meaningless to decode non-first fragment */ - if ((EXTRACT_BE_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK) != 0) + if ((EXTRACT_BE_U_2(&dp->ip6f_offlg) & IP6F_OFF_MASK) != 0) return -1; else {