Skip to content

Commit

Permalink
Reinitialize IP header length after checksum calculation. It is used
Browse files Browse the repository at this point in the history
later by TCP-MD5 code.

This fixes the problem with broken TCP-MD5 over IPv4 when NIC has
disabled TCP checksum offloading.

PR:		223835
MFC after:	1 week
  • Loading branch information
bu7cher authored and fichtner committed Feb 11, 2018
1 parent 5a1bbae commit 6b6b693
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sys/netinet/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ tcp_input(struct mbuf **mp, int *offp, int proto)
ip->ip_tos = iptos;
/* Re-initialization for later version check */
ip->ip_v = IPVERSION;
ip->ip_hl = off0 >> 2;
}

if (th->th_sum) {
Expand Down

0 comments on commit 6b6b693

Please sign in to comment.