In tcpdump's print-tcp.c, avoid increasing alignment when taking the

addresses of members of struct ip, which is packed.  Since the pointers
are only used for memcmp'ing, they can be pointing to void instead.

Note that upstream has removed the src and dst variables, in the mean
time.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2017-01-07 00:17:01 +00:00
parent e4612db2cd
commit 05ea86b0c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311570

View File

@ -253,7 +253,7 @@ tcp_print(netdissect_options *ndo,
if (ip6) {
register struct tcp_seq_hash6 *th;
struct tcp_seq_hash6 *tcp_seq_hash;
const struct in6_addr *src, *dst;
const void *src, *dst;
struct tha6 tha;
tcp_seq_hash = tcp_seq_hash6;
@ -309,7 +309,7 @@ tcp_print(netdissect_options *ndo,
#endif /*INET6*/
register struct tcp_seq_hash *th;
struct tcp_seq_hash *tcp_seq_hash;
const struct in_addr *src, *dst;
const void *src, *dst;
struct tha tha;
tcp_seq_hash = tcp_seq_hash4;