Skip to content

Commit

Permalink
fix endianness bug in inet_lro
Browse files Browse the repository at this point in the history
all uses of and almost all assignments to lro_desc->tcp_ack assume that it's
net-endian; one converts net-endian to host-endian and sticks it in
lro_desc->tcp_ack.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 14, 2007
1 parent 9df7c98 commit f53f413
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/inet_lro.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct net_lro_desc {
__wsum data_csum;
__be32 tcp_rcv_tsecr;
__be32 tcp_rcv_tsval;
u32 tcp_ack;
__be32 tcp_ack;
u32 tcp_next_seq;
u32 skb_tot_frags_len;
u16 ip_tot_len;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/inet_lro.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb,
lro_desc->iph = iph;
lro_desc->tcph = tcph;
lro_desc->tcp_next_seq = ntohl(tcph->seq) + tcp_data_len;
lro_desc->tcp_ack = ntohl(tcph->ack_seq);
lro_desc->tcp_ack = tcph->ack_seq;
lro_desc->tcp_window = tcph->window;

lro_desc->pkt_aggr_cnt = 1;
Expand Down

0 comments on commit f53f413

Please sign in to comment.