aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tcp.h2
-rw-r--r--net/ipv4/tcp.c8
-rw-r--r--net/ipv4/tcp_input.c4
-rw-r--r--net/ipv4/tcp_output.c63
4 files changed, 39 insertions, 38 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 28a9997d783..0113d306fcb 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -636,7 +636,7 @@ struct tcp_skb_cb {
636 __u32 seq; /* Starting sequence number */ 636 __u32 seq; /* Starting sequence number */
637 __u32 end_seq; /* SEQ + FIN + SYN + datalen */ 637 __u32 end_seq; /* SEQ + FIN + SYN + datalen */
638 __u32 when; /* used to compute rtt's */ 638 __u32 when; /* used to compute rtt's */
639 __u8 flags; /* TCP header flags. */ 639 __u8 tcp_flags; /* TCP header flags. (tcp[13]) */
640 __u8 sacked; /* State flags for SACK/FACK. */ 640 __u8 sacked; /* State flags for SACK/FACK. */
641#define TCPCB_SACKED_ACKED 0x01 /* SKB ACK'd by a SACK block */ 641#define TCPCB_SACKED_ACKED 0x01 /* SKB ACK'd by a SACK block */
642#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ 642#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index cc0d5dead30..131c45f9337 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -524,7 +524,7 @@ EXPORT_SYMBOL(tcp_ioctl);
524 524
525static inline void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb) 525static inline void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb)
526{ 526{
527 TCP_SKB_CB(skb)->flags |= TCPHDR_PSH; 527 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_PSH;
528 tp->pushed_seq = tp->write_seq; 528 tp->pushed_seq = tp->write_seq;
529} 529}
530 530
@@ -540,7 +540,7 @@ static inline void skb_entail(struct sock *sk, struct sk_buff *skb)
540 540
541 skb->csum = 0; 541 skb->csum = 0;
542 tcb->seq = tcb->end_seq = tp->write_seq; 542 tcb->seq = tcb->end_seq = tp->write_seq;
543 tcb->flags = TCPHDR_ACK; 543 tcb->tcp_flags = TCPHDR_ACK;
544 tcb->sacked = 0; 544 tcb->sacked = 0;
545 skb_header_release(skb); 545 skb_header_release(skb);
546 tcp_add_write_queue_tail(sk, skb); 546 tcp_add_write_queue_tail(sk, skb);
@@ -830,7 +830,7 @@ new_segment:
830 skb_shinfo(skb)->gso_segs = 0; 830 skb_shinfo(skb)->gso_segs = 0;
831 831
832 if (!copied) 832 if (!copied)
833 TCP_SKB_CB(skb)->flags &= ~TCPHDR_PSH; 833 TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_PSH;
834 834
835 copied += copy; 835 copied += copy;
836 poffset += copy; 836 poffset += copy;
@@ -1074,7 +1074,7 @@ new_segment:
1074 } 1074 }
1075 1075
1076 if (!copied) 1076 if (!copied)
1077 TCP_SKB_CB(skb)->flags &= ~TCPHDR_PSH; 1077 TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_PSH;
1078 1078
1079 tp->write_seq += copy; 1079 tp->write_seq += copy;
1080 TCP_SKB_CB(skb)->end_seq += copy; 1080 TCP_SKB_CB(skb)->end_seq += copy;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7008fccc164..143221ebeb7 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1449,7 +1449,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
1449 tp->lost_cnt_hint -= tcp_skb_pcount(prev); 1449 tp->lost_cnt_hint -= tcp_skb_pcount(prev);
1450 } 1450 }
1451 1451
1452 TCP_SKB_CB(skb)->flags |= TCP_SKB_CB(prev)->flags; 1452 TCP_SKB_CB(skb)->tcp_flags |= TCP_SKB_CB(prev)->tcp_flags;
1453 if (skb == tcp_highest_sack(sk)) 1453 if (skb == tcp_highest_sack(sk))
1454 tcp_advance_highest_sack(sk, skb); 1454 tcp_advance_highest_sack(sk, skb);
1455 1455
@@ -3348,7 +3348,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3348 * connection startup slow start one packet too 3348 * connection startup slow start one packet too
3349 * quickly. This is severely frowned upon behavior. 3349 * quickly. This is severely frowned upon behavior.
3350 */ 3350 */
3351 if (!(scb->flags & TCPHDR_SYN)) { 3351 if (!(scb->tcp_flags & TCPHDR_SYN)) {
3352 flag |= FLAG_DATA_ACKED; 3352 flag |= FLAG_DATA_ACKED;
3353 } else { 3353 } else {
3354 flag |= FLAG_SYN_ACKED; 3354 flag |= FLAG_SYN_ACKED;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 081dcd6fd0c..dde6b576831 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -297,9 +297,9 @@ static u16 tcp_select_window(struct sock *sk)
297/* Packet ECN state for a SYN-ACK */ 297/* Packet ECN state for a SYN-ACK */
298static inline void TCP_ECN_send_synack(struct tcp_sock *tp, struct sk_buff *skb) 298static inline void TCP_ECN_send_synack(struct tcp_sock *tp, struct sk_buff *skb)
299{ 299{
300 TCP_SKB_CB(skb)->flags &= ~TCPHDR_CWR; 300 TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_CWR;
301 if (!(tp->ecn_flags & TCP_ECN_OK)) 301 if (!(tp->ecn_flags & TCP_ECN_OK))
302 TCP_SKB_CB(skb)->flags &= ~TCPHDR_ECE; 302 TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_ECE;
303} 303}
304 304
305/* Packet ECN state for a SYN. */ 305/* Packet ECN state for a SYN. */
@@ -309,7 +309,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb)
309 309
310 tp->ecn_flags = 0; 310 tp->ecn_flags = 0;
311 if (sysctl_tcp_ecn == 1) { 311 if (sysctl_tcp_ecn == 1) {
312 TCP_SKB_CB(skb)->flags |= TCPHDR_ECE | TCPHDR_CWR; 312 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ECE | TCPHDR_CWR;
313 tp->ecn_flags = TCP_ECN_OK; 313 tp->ecn_flags = TCP_ECN_OK;
314 } 314 }
315} 315}
@@ -356,7 +356,7 @@ static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags)
356 skb->ip_summed = CHECKSUM_PARTIAL; 356 skb->ip_summed = CHECKSUM_PARTIAL;
357 skb->csum = 0; 357 skb->csum = 0;
358 358
359 TCP_SKB_CB(skb)->flags = flags; 359 TCP_SKB_CB(skb)->tcp_flags = flags;
360 TCP_SKB_CB(skb)->sacked = 0; 360 TCP_SKB_CB(skb)->sacked = 0;
361 361
362 skb_shinfo(skb)->gso_segs = 1; 362 skb_shinfo(skb)->gso_segs = 1;
@@ -826,7 +826,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
826 tcb = TCP_SKB_CB(skb); 826 tcb = TCP_SKB_CB(skb);
827 memset(&opts, 0, sizeof(opts)); 827 memset(&opts, 0, sizeof(opts));
828 828
829 if (unlikely(tcb->flags & TCPHDR_SYN)) 829 if (unlikely(tcb->tcp_flags & TCPHDR_SYN))
830 tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5); 830 tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5);
831 else 831 else
832 tcp_options_size = tcp_established_options(sk, skb, &opts, 832 tcp_options_size = tcp_established_options(sk, skb, &opts,
@@ -850,9 +850,9 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
850 th->seq = htonl(tcb->seq); 850 th->seq = htonl(tcb->seq);
851 th->ack_seq = htonl(tp->rcv_nxt); 851 th->ack_seq = htonl(tp->rcv_nxt);
852 *(((__be16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) | 852 *(((__be16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) |
853 tcb->flags); 853 tcb->tcp_flags);
854 854
855 if (unlikely(tcb->flags & TCPHDR_SYN)) { 855 if (unlikely(tcb->tcp_flags & TCPHDR_SYN)) {
856 /* RFC1323: The window in SYN & SYN/ACK segments 856 /* RFC1323: The window in SYN & SYN/ACK segments
857 * is never scaled. 857 * is never scaled.
858 */ 858 */
@@ -875,7 +875,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
875 } 875 }
876 876
877 tcp_options_write((__be32 *)(th + 1), tp, &opts); 877 tcp_options_write((__be32 *)(th + 1), tp, &opts);
878 if (likely((tcb->flags & TCPHDR_SYN) == 0)) 878 if (likely((tcb->tcp_flags & TCPHDR_SYN) == 0))
879 TCP_ECN_send(sk, skb, tcp_header_size); 879 TCP_ECN_send(sk, skb, tcp_header_size);
880 880
881#ifdef CONFIG_TCP_MD5SIG 881#ifdef CONFIG_TCP_MD5SIG
@@ -889,7 +889,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
889 889
890 icsk->icsk_af_ops->send_check(sk, skb); 890 icsk->icsk_af_ops->send_check(sk, skb);
891 891
892 if (likely(tcb->flags & TCPHDR_ACK)) 892 if (likely(tcb->tcp_flags & TCPHDR_ACK))
893 tcp_event_ack_sent(sk, tcp_skb_pcount(skb)); 893 tcp_event_ack_sent(sk, tcp_skb_pcount(skb));
894 894
895 if (skb->len != tcp_header_size) 895 if (skb->len != tcp_header_size)
@@ -1032,9 +1032,9 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
1032 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq; 1032 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq;
1033 1033
1034 /* PSH and FIN should only be set in the second packet. */ 1034 /* PSH and FIN should only be set in the second packet. */
1035 flags = TCP_SKB_CB(skb)->flags; 1035 flags = TCP_SKB_CB(skb)->tcp_flags;
1036 TCP_SKB_CB(skb)->flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH); 1036 TCP_SKB_CB(skb)->tcp_flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH);
1037 TCP_SKB_CB(buff)->flags = flags; 1037 TCP_SKB_CB(buff)->tcp_flags = flags;
1038 TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked; 1038 TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked;
1039 1039
1040 if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) { 1040 if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) {
@@ -1340,7 +1340,8 @@ static inline unsigned int tcp_cwnd_test(struct tcp_sock *tp,
1340 u32 in_flight, cwnd; 1340 u32 in_flight, cwnd;
1341 1341
1342 /* Don't be strict about the congestion window for the final FIN. */ 1342 /* Don't be strict about the congestion window for the final FIN. */
1343 if ((TCP_SKB_CB(skb)->flags & TCPHDR_FIN) && tcp_skb_pcount(skb) == 1) 1343 if ((TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) &&
1344 tcp_skb_pcount(skb) == 1)
1344 return 1; 1345 return 1;
1345 1346
1346 in_flight = tcp_packets_in_flight(tp); 1347 in_flight = tcp_packets_in_flight(tp);
@@ -1409,7 +1410,7 @@ static inline int tcp_nagle_test(struct tcp_sock *tp, struct sk_buff *skb,
1409 * Nagle can be ignored during F-RTO too (see RFC4138). 1410 * Nagle can be ignored during F-RTO too (see RFC4138).
1410 */ 1411 */
1411 if (tcp_urg_mode(tp) || (tp->frto_counter == 2) || 1412 if (tcp_urg_mode(tp) || (tp->frto_counter == 2) ||
1412 (TCP_SKB_CB(skb)->flags & TCPHDR_FIN)) 1413 (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN))
1413 return 1; 1414 return 1;
1414 1415
1415 if (!tcp_nagle_check(tp, skb, cur_mss, nonagle)) 1416 if (!tcp_nagle_check(tp, skb, cur_mss, nonagle))
@@ -1497,9 +1498,9 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
1497 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq; 1498 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq;
1498 1499
1499 /* PSH and FIN should only be set in the second packet. */ 1500 /* PSH and FIN should only be set in the second packet. */
1500 flags = TCP_SKB_CB(skb)->flags; 1501 flags = TCP_SKB_CB(skb)->tcp_flags;
1501 TCP_SKB_CB(skb)->flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH); 1502 TCP_SKB_CB(skb)->tcp_flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH);
1502 TCP_SKB_CB(buff)->flags = flags; 1503 TCP_SKB_CB(buff)->tcp_flags = flags;
1503 1504
1504 /* This packet was never sent out yet, so no SACK bits. */ 1505 /* This packet was never sent out yet, so no SACK bits. */
1505 TCP_SKB_CB(buff)->sacked = 0; 1506 TCP_SKB_CB(buff)->sacked = 0;
@@ -1530,7 +1531,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
1530 u32 send_win, cong_win, limit, in_flight; 1531 u32 send_win, cong_win, limit, in_flight;
1531 int win_divisor; 1532 int win_divisor;
1532 1533
1533 if (TCP_SKB_CB(skb)->flags & TCPHDR_FIN) 1534 if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
1534 goto send_now; 1535 goto send_now;
1535 1536
1536 if (icsk->icsk_ca_state != TCP_CA_Open) 1537 if (icsk->icsk_ca_state != TCP_CA_Open)
@@ -1657,7 +1658,7 @@ static int tcp_mtu_probe(struct sock *sk)
1657 1658
1658 TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(skb)->seq; 1659 TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(skb)->seq;
1659 TCP_SKB_CB(nskb)->end_seq = TCP_SKB_CB(skb)->seq + probe_size; 1660 TCP_SKB_CB(nskb)->end_seq = TCP_SKB_CB(skb)->seq + probe_size;
1660 TCP_SKB_CB(nskb)->flags = TCPHDR_ACK; 1661 TCP_SKB_CB(nskb)->tcp_flags = TCPHDR_ACK;
1661 TCP_SKB_CB(nskb)->sacked = 0; 1662 TCP_SKB_CB(nskb)->sacked = 0;
1662 nskb->csum = 0; 1663 nskb->csum = 0;
1663 nskb->ip_summed = skb->ip_summed; 1664 nskb->ip_summed = skb->ip_summed;
@@ -1677,11 +1678,11 @@ static int tcp_mtu_probe(struct sock *sk)
1677 if (skb->len <= copy) { 1678 if (skb->len <= copy) {
1678 /* We've eaten all the data from this skb. 1679 /* We've eaten all the data from this skb.
1679 * Throw it away. */ 1680 * Throw it away. */
1680 TCP_SKB_CB(nskb)->flags |= TCP_SKB_CB(skb)->flags; 1681 TCP_SKB_CB(nskb)->tcp_flags |= TCP_SKB_CB(skb)->tcp_flags;
1681 tcp_unlink_write_queue(skb, sk); 1682 tcp_unlink_write_queue(skb, sk);
1682 sk_wmem_free_skb(sk, skb); 1683 sk_wmem_free_skb(sk, skb);
1683 } else { 1684 } else {
1684 TCP_SKB_CB(nskb)->flags |= TCP_SKB_CB(skb)->flags & 1685 TCP_SKB_CB(nskb)->tcp_flags |= TCP_SKB_CB(skb)->tcp_flags &
1685 ~(TCPHDR_FIN|TCPHDR_PSH); 1686 ~(TCPHDR_FIN|TCPHDR_PSH);
1686 if (!skb_shinfo(skb)->nr_frags) { 1687 if (!skb_shinfo(skb)->nr_frags) {
1687 skb_pull(skb, copy); 1688 skb_pull(skb, copy);
@@ -1987,7 +1988,7 @@ static void tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
1987 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(next_skb)->end_seq; 1988 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(next_skb)->end_seq;
1988 1989
1989 /* Merge over control information. This moves PSH/FIN etc. over */ 1990 /* Merge over control information. This moves PSH/FIN etc. over */
1990 TCP_SKB_CB(skb)->flags |= TCP_SKB_CB(next_skb)->flags; 1991 TCP_SKB_CB(skb)->tcp_flags |= TCP_SKB_CB(next_skb)->tcp_flags;
1991 1992
1992 /* All done, get rid of second SKB and account for it so 1993 /* All done, get rid of second SKB and account for it so
1993 * packet counting does not break. 1994 * packet counting does not break.
@@ -2035,7 +2036,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to,
2035 2036
2036 if (!sysctl_tcp_retrans_collapse) 2037 if (!sysctl_tcp_retrans_collapse)
2037 return; 2038 return;
2038 if (TCP_SKB_CB(skb)->flags & TCPHDR_SYN) 2039 if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)
2039 return; 2040 return;
2040 2041
2041 tcp_for_write_queue_from_safe(skb, tmp, sk) { 2042 tcp_for_write_queue_from_safe(skb, tmp, sk) {
@@ -2127,12 +2128,12 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
2127 * since it is cheap to do so and saves bytes on the network. 2128 * since it is cheap to do so and saves bytes on the network.
2128 */ 2129 */
2129 if (skb->len > 0 && 2130 if (skb->len > 0 &&
2130 (TCP_SKB_CB(skb)->flags & TCPHDR_FIN) && 2131 (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) &&
2131 tp->snd_una == (TCP_SKB_CB(skb)->end_seq - 1)) { 2132 tp->snd_una == (TCP_SKB_CB(skb)->end_seq - 1)) {
2132 if (!pskb_trim(skb, 0)) { 2133 if (!pskb_trim(skb, 0)) {
2133 /* Reuse, even though it does some unnecessary work */ 2134 /* Reuse, even though it does some unnecessary work */
2134 tcp_init_nondata_skb(skb, TCP_SKB_CB(skb)->end_seq - 1, 2135 tcp_init_nondata_skb(skb, TCP_SKB_CB(skb)->end_seq - 1,
2135 TCP_SKB_CB(skb)->flags); 2136 TCP_SKB_CB(skb)->tcp_flags);
2136 skb->ip_summed = CHECKSUM_NONE; 2137 skb->ip_summed = CHECKSUM_NONE;
2137 } 2138 }
2138 } 2139 }
@@ -2322,7 +2323,7 @@ void tcp_send_fin(struct sock *sk)
2322 mss_now = tcp_current_mss(sk); 2323 mss_now = tcp_current_mss(sk);
2323 2324
2324 if (tcp_send_head(sk) != NULL) { 2325 if (tcp_send_head(sk) != NULL) {
2325 TCP_SKB_CB(skb)->flags |= TCPHDR_FIN; 2326 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_FIN;
2326 TCP_SKB_CB(skb)->end_seq++; 2327 TCP_SKB_CB(skb)->end_seq++;
2327 tp->write_seq++; 2328 tp->write_seq++;
2328 } else { 2329 } else {
@@ -2384,11 +2385,11 @@ int tcp_send_synack(struct sock *sk)
2384 struct sk_buff *skb; 2385 struct sk_buff *skb;
2385 2386
2386 skb = tcp_write_queue_head(sk); 2387 skb = tcp_write_queue_head(sk);
2387 if (skb == NULL || !(TCP_SKB_CB(skb)->flags & TCPHDR_SYN)) { 2388 if (skb == NULL || !(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)) {
2388 printk(KERN_DEBUG "tcp_send_synack: wrong queue state\n"); 2389 printk(KERN_DEBUG "tcp_send_synack: wrong queue state\n");
2389 return -EFAULT; 2390 return -EFAULT;
2390 } 2391 }
2391 if (!(TCP_SKB_CB(skb)->flags & TCPHDR_ACK)) { 2392 if (!(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_ACK)) {
2392 if (skb_cloned(skb)) { 2393 if (skb_cloned(skb)) {
2393 struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC); 2394 struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC);
2394 if (nskb == NULL) 2395 if (nskb == NULL)
@@ -2402,7 +2403,7 @@ int tcp_send_synack(struct sock *sk)
2402 skb = nskb; 2403 skb = nskb;
2403 } 2404 }
2404 2405
2405 TCP_SKB_CB(skb)->flags |= TCPHDR_ACK; 2406 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ACK;
2406 TCP_ECN_send_synack(tcp_sk(sk), skb); 2407 TCP_ECN_send_synack(tcp_sk(sk), skb);
2407 } 2408 }
2408 TCP_SKB_CB(skb)->when = tcp_time_stamp; 2409 TCP_SKB_CB(skb)->when = tcp_time_stamp;
@@ -2799,13 +2800,13 @@ int tcp_write_wakeup(struct sock *sk)
2799 if (seg_size < TCP_SKB_CB(skb)->end_seq - TCP_SKB_CB(skb)->seq || 2800 if (seg_size < TCP_SKB_CB(skb)->end_seq - TCP_SKB_CB(skb)->seq ||
2800 skb->len > mss) { 2801 skb->len > mss) {
2801 seg_size = min(seg_size, mss); 2802 seg_size = min(seg_size, mss);
2802 TCP_SKB_CB(skb)->flags |= TCPHDR_PSH; 2803 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_PSH;
2803 if (tcp_fragment(sk, skb, seg_size, mss)) 2804 if (tcp_fragment(sk, skb, seg_size, mss))
2804 return -1; 2805 return -1;
2805 } else if (!tcp_skb_pcount(skb)) 2806 } else if (!tcp_skb_pcount(skb))
2806 tcp_set_skb_tso_segs(sk, skb, mss); 2807 tcp_set_skb_tso_segs(sk, skb, mss);
2807 2808
2808 TCP_SKB_CB(skb)->flags |= TCPHDR_PSH; 2809 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_PSH;
2809 TCP_SKB_CB(skb)->when = tcp_time_stamp; 2810 TCP_SKB_CB(skb)->when = tcp_time_stamp;
2810 err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC); 2811 err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);
2811 if (!err) 2812 if (!err)