X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/4f1cc2f3e30f23c73b9edd97c85af92327d57f7b..2de3a27ab75415237de96d2539e86b959ad0a9d0:/print-ip.c diff --git a/print-ip.c b/print-ip.c index 07c9c0fe..e1085e96 100644 --- a/print-ip.c +++ b/print-ip.c @@ -99,7 +99,7 @@ ip_finddst(netdissect_options *ndo, const u_char *cp; cp = (const u_char *)(ip + 1); - length = (IP_HL(ip) << 2); + length = IP_HL(ip) * 4; if (length < sizeof(struct ip)) goto trunc; length -= sizeof(struct ip); @@ -138,7 +138,7 @@ trunc: /* * Compute a V4-style checksum by building a pseudoheader. */ -int +uint16_t nextproto4_cksum(netdissect_options *ndo, const struct ip *ip, const uint8_t *data, u_int len, u_int covlen, u_int next_proto)