mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
tcp: MD5: Fix MD5 signatures on certain ACK packets
I noticed, looking at tcpdumps, that timewait ACKs were getting sent
with an incorrect MD5 signature when signatures were enabled.
I broke this in 49a72dfb88
("tcp: Fix
MD5 signatures for non-linear skbs"). I didn't take into account that
the skb passed to tcp_*_send_ack was the inbound packet, thus the
source and dest addresses need to be swapped when calculating the MD5
pseudoheader.
Signed-off-by: Adam Langley <agl@imperialviolet.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
77e2f14f71
commit
90b7e1120b
2 changed files with 4 additions and 4 deletions
|
@ -655,8 +655,8 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
|
|||
rep.th.doff = arg.iov[0].iov_len/4;
|
||||
|
||||
tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[offset],
|
||||
key, ip_hdr(skb)->daddr,
|
||||
ip_hdr(skb)->saddr, &rep.th);
|
||||
key, ip_hdr(skb)->saddr,
|
||||
ip_hdr(skb)->daddr, &rep.th);
|
||||
}
|
||||
#endif
|
||||
arg.csum = csum_tcpudp_nofold(ip_hdr(skb)->daddr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue