@@ -297,9 +297,9 @@ static u16 tcp_select_window(struct sock *sk)
297297/* Packet ECN state for a SYN-ACK */
298298static inline void TCP_ECN_send_synack (struct tcp_sock * tp , struct sk_buff * skb )
299299{
300- TCP_SKB_CB (skb )-> flags &= ~TCPHDR_CWR ;
300+ TCP_SKB_CB (skb )-> tcp_flags &= ~TCPHDR_CWR ;
301301 if (!(tp -> ecn_flags & TCP_ECN_OK ))
302- TCP_SKB_CB (skb )-> flags &= ~TCPHDR_ECE ;
302+ TCP_SKB_CB (skb )-> tcp_flags &= ~TCPHDR_ECE ;
303303}
304304
305305/* Packet ECN state for a SYN. */
@@ -309,7 +309,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb)
309309
310310 tp -> ecn_flags = 0 ;
311311 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 ;
313313 tp -> ecn_flags = TCP_ECN_OK ;
314314 }
315315}
@@ -356,7 +356,7 @@ static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags)
356356 skb -> ip_summed = CHECKSUM_PARTIAL ;
357357 skb -> csum = 0 ;
358358
359- TCP_SKB_CB (skb )-> flags = flags ;
359+ TCP_SKB_CB (skb )-> tcp_flags = flags ;
360360 TCP_SKB_CB (skb )-> sacked = 0 ;
361361
362362 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,
826826 tcb = TCP_SKB_CB (skb );
827827 memset (& opts , 0 , sizeof (opts ));
828828
829- if (unlikely (tcb -> flags & TCPHDR_SYN ))
829+ if (unlikely (tcb -> tcp_flags & TCPHDR_SYN ))
830830 tcp_options_size = tcp_syn_options (sk , skb , & opts , & md5 );
831831 else
832832 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,
850850 th -> seq = htonl (tcb -> seq );
851851 th -> ack_seq = htonl (tp -> rcv_nxt );
852852 * (((__be16 * )th ) + 6 ) = htons (((tcp_header_size >> 2 ) << 12 ) |
853- tcb -> flags );
853+ tcb -> tcp_flags );
854854
855- if (unlikely (tcb -> flags & TCPHDR_SYN )) {
855+ if (unlikely (tcb -> tcp_flags & TCPHDR_SYN )) {
856856 /* RFC1323: The window in SYN & SYN/ACK segments
857857 * is never scaled.
858858 */
@@ -875,7 +875,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
875875 }
876876
877877 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 ))
879879 TCP_ECN_send (sk , skb , tcp_header_size );
880880
881881#ifdef CONFIG_TCP_MD5SIG
@@ -889,7 +889,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
889889
890890 icsk -> icsk_af_ops -> send_check (sk , skb );
891891
892- if (likely (tcb -> flags & TCPHDR_ACK ))
892+ if (likely (tcb -> tcp_flags & TCPHDR_ACK ))
893893 tcp_event_ack_sent (sk , tcp_skb_pcount (skb ));
894894
895895 if (skb -> len != tcp_header_size )
@@ -1032,9 +1032,9 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
10321032 TCP_SKB_CB (skb )-> end_seq = TCP_SKB_CB (buff )-> seq ;
10331033
10341034 /* PSH and FIN should only be set in the second packet. */
1035- flags = TCP_SKB_CB (skb )-> flags ;
1036- TCP_SKB_CB (skb )-> flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH );
1037- TCP_SKB_CB (buff )-> flags = flags ;
1035+ flags = TCP_SKB_CB (skb )-> tcp_flags ;
1036+ TCP_SKB_CB (skb )-> tcp_flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH );
1037+ TCP_SKB_CB (buff )-> tcp_flags = flags ;
10381038 TCP_SKB_CB (buff )-> sacked = TCP_SKB_CB (skb )-> sacked ;
10391039
10401040 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,
13401340 u32 in_flight , cwnd ;
13411341
13421342 /* 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 )
13441345 return 1 ;
13451346
13461347 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,
14091410 * Nagle can be ignored during F-RTO too (see RFC4138).
14101411 */
14111412 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 ))
14131414 return 1 ;
14141415
14151416 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,
14971498 TCP_SKB_CB (skb )-> end_seq = TCP_SKB_CB (buff )-> seq ;
14981499
14991500 /* PSH and FIN should only be set in the second packet. */
1500- flags = TCP_SKB_CB (skb )-> flags ;
1501- TCP_SKB_CB (skb )-> flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH );
1502- TCP_SKB_CB (buff )-> flags = flags ;
1501+ flags = TCP_SKB_CB (skb )-> tcp_flags ;
1502+ TCP_SKB_CB (skb )-> tcp_flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH );
1503+ TCP_SKB_CB (buff )-> tcp_flags = flags ;
15031504
15041505 /* This packet was never sent out yet, so no SACK bits. */
15051506 TCP_SKB_CB (buff )-> sacked = 0 ;
@@ -1530,7 +1531,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
15301531 u32 send_win , cong_win , limit , in_flight ;
15311532 int win_divisor ;
15321533
1533- if (TCP_SKB_CB (skb )-> flags & TCPHDR_FIN )
1534+ if (TCP_SKB_CB (skb )-> tcp_flags & TCPHDR_FIN )
15341535 goto send_now ;
15351536
15361537 if (icsk -> icsk_ca_state != TCP_CA_Open )
@@ -1657,7 +1658,7 @@ static int tcp_mtu_probe(struct sock *sk)
16571658
16581659 TCP_SKB_CB (nskb )-> seq = TCP_SKB_CB (skb )-> seq ;
16591660 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 ;
16611662 TCP_SKB_CB (nskb )-> sacked = 0 ;
16621663 nskb -> csum = 0 ;
16631664 nskb -> ip_summed = skb -> ip_summed ;
@@ -1677,11 +1678,11 @@ static int tcp_mtu_probe(struct sock *sk)
16771678 if (skb -> len <= copy ) {
16781679 /* We've eaten all the data from this skb.
16791680 * 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 ;
16811682 tcp_unlink_write_queue (skb , sk );
16821683 sk_wmem_free_skb (sk , skb );
16831684 } 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 &
16851686 ~(TCPHDR_FIN |TCPHDR_PSH );
16861687 if (!skb_shinfo (skb )-> nr_frags ) {
16871688 skb_pull (skb , copy );
@@ -1987,7 +1988,7 @@ static void tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
19871988 TCP_SKB_CB (skb )-> end_seq = TCP_SKB_CB (next_skb )-> end_seq ;
19881989
19891990 /* 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 ;
19911992
19921993 /* All done, get rid of second SKB and account for it so
19931994 * packet counting does not break.
@@ -2035,7 +2036,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to,
20352036
20362037 if (!sysctl_tcp_retrans_collapse )
20372038 return ;
2038- if (TCP_SKB_CB (skb )-> flags & TCPHDR_SYN )
2039+ if (TCP_SKB_CB (skb )-> tcp_flags & TCPHDR_SYN )
20392040 return ;
20402041
20412042 tcp_for_write_queue_from_safe (skb , tmp , sk ) {
@@ -2127,12 +2128,12 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
21272128 * since it is cheap to do so and saves bytes on the network.
21282129 */
21292130 if (skb -> len > 0 &&
2130- (TCP_SKB_CB (skb )-> flags & TCPHDR_FIN ) &&
2131+ (TCP_SKB_CB (skb )-> tcp_flags & TCPHDR_FIN ) &&
21312132 tp -> snd_una == (TCP_SKB_CB (skb )-> end_seq - 1 )) {
21322133 if (!pskb_trim (skb , 0 )) {
21332134 /* Reuse, even though it does some unnecessary work */
21342135 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 );
21362137 skb -> ip_summed = CHECKSUM_NONE ;
21372138 }
21382139 }
@@ -2322,7 +2323,7 @@ void tcp_send_fin(struct sock *sk)
23222323 mss_now = tcp_current_mss (sk );
23232324
23242325 if (tcp_send_head (sk ) != NULL ) {
2325- TCP_SKB_CB (skb )-> flags |= TCPHDR_FIN ;
2326+ TCP_SKB_CB (skb )-> tcp_flags |= TCPHDR_FIN ;
23262327 TCP_SKB_CB (skb )-> end_seq ++ ;
23272328 tp -> write_seq ++ ;
23282329 } else {
@@ -2384,11 +2385,11 @@ int tcp_send_synack(struct sock *sk)
23842385 struct sk_buff * skb ;
23852386
23862387 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 )) {
23882389 printk (KERN_DEBUG "tcp_send_synack: wrong queue state\n" );
23892390 return - EFAULT ;
23902391 }
2391- if (!(TCP_SKB_CB (skb )-> flags & TCPHDR_ACK )) {
2392+ if (!(TCP_SKB_CB (skb )-> tcp_flags & TCPHDR_ACK )) {
23922393 if (skb_cloned (skb )) {
23932394 struct sk_buff * nskb = skb_copy (skb , GFP_ATOMIC );
23942395 if (nskb == NULL )
@@ -2402,7 +2403,7 @@ int tcp_send_synack(struct sock *sk)
24022403 skb = nskb ;
24032404 }
24042405
2405- TCP_SKB_CB (skb )-> flags |= TCPHDR_ACK ;
2406+ TCP_SKB_CB (skb )-> tcp_flags |= TCPHDR_ACK ;
24062407 TCP_ECN_send_synack (tcp_sk (sk ), skb );
24072408 }
24082409 TCP_SKB_CB (skb )-> when = tcp_time_stamp ;
@@ -2799,13 +2800,13 @@ int tcp_write_wakeup(struct sock *sk)
27992800 if (seg_size < TCP_SKB_CB (skb )-> end_seq - TCP_SKB_CB (skb )-> seq ||
28002801 skb -> len > mss ) {
28012802 seg_size = min (seg_size , mss );
2802- TCP_SKB_CB (skb )-> flags |= TCPHDR_PSH ;
2803+ TCP_SKB_CB (skb )-> tcp_flags |= TCPHDR_PSH ;
28032804 if (tcp_fragment (sk , skb , seg_size , mss ))
28042805 return -1 ;
28052806 } else if (!tcp_skb_pcount (skb ))
28062807 tcp_set_skb_tso_segs (sk , skb , mss );
28072808
2808- TCP_SKB_CB (skb )-> flags |= TCPHDR_PSH ;
2809+ TCP_SKB_CB (skb )-> tcp_flags |= TCPHDR_PSH ;
28092810 TCP_SKB_CB (skb )-> when = tcp_time_stamp ;
28102811 err = tcp_transmit_skb (sk , skb , 1 , GFP_ATOMIC );
28112812 if (!err )
0 commit comments