diff options
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 463d2b24d2db..a12b08fca5ad 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -453,7 +453,8 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, | |||
453 | newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0; | 453 | newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0; |
454 | newtp->window_clamp = min(newtp->window_clamp, 65535U); | 454 | newtp->window_clamp = min(newtp->window_clamp, 65535U); |
455 | } | 455 | } |
456 | newtp->snd_wnd = ntohs(skb->h.th->window) << newtp->rx_opt.snd_wscale; | 456 | newtp->snd_wnd = (ntohs(tcp_hdr(skb)->window) << |
457 | newtp->rx_opt.snd_wscale); | ||
457 | newtp->max_window = newtp->snd_wnd; | 458 | newtp->max_window = newtp->snd_wnd; |
458 | 459 | ||
459 | if (newtp->rx_opt.tstamp_ok) { | 460 | if (newtp->rx_opt.tstamp_ok) { |
@@ -488,7 +489,7 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | |||
488 | struct request_sock *req, | 489 | struct request_sock *req, |
489 | struct request_sock **prev) | 490 | struct request_sock **prev) |
490 | { | 491 | { |
491 | struct tcphdr *th = skb->h.th; | 492 | const struct tcphdr *th = tcp_hdr(skb); |
492 | __be32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK); | 493 | __be32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK); |
493 | int paws_reject = 0; | 494 | int paws_reject = 0; |
494 | struct tcp_options_received tmp_opt; | 495 | struct tcp_options_received tmp_opt; |
@@ -710,8 +711,8 @@ int tcp_child_process(struct sock *parent, struct sock *child, | |||
710 | int state = child->sk_state; | 711 | int state = child->sk_state; |
711 | 712 | ||
712 | if (!sock_owned_by_user(child)) { | 713 | if (!sock_owned_by_user(child)) { |
713 | ret = tcp_rcv_state_process(child, skb, skb->h.th, skb->len); | 714 | ret = tcp_rcv_state_process(child, skb, tcp_hdr(skb), |
714 | 715 | skb->len); | |
715 | /* Wakeup parent, send SIGIO */ | 716 | /* Wakeup parent, send SIGIO */ |
716 | if (state == TCP_SYN_RECV && child->sk_state != state) | 717 | if (state == TCP_SYN_RECV && child->sk_state != state) |
717 | parent->sk_data_ready(parent, 0); | 718 | parent->sk_data_ready(parent, 0); |