This source file includes following definitions.
- tcp_send_skb
- tcp_dequeue_partial
- tcp_send_partial
- tcp_enqueue_partial
- tcp_write_xmit
- tcp_do_retransmit
- tcp_send_reset
- tcp_send_fin
- tcp_send_synack
- tcp_send_ack
- tcp_write_wakeup
- tcp_send_probe0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #include <linux/config.h>
24 #include <net/tcp.h>
25
26
27
28
29
30
31 void tcp_send_skb(struct sock *sk, struct sk_buff *skb)
32 {
33 int size;
34 struct tcphdr * th = skb->h.th;
35
36
37
38
39
40 size = skb->len - ((unsigned char *) th - skb->data);
41
42
43
44
45
46 if (size < sizeof(struct tcphdr) || size > skb->len)
47 {
48 printk("tcp_send_skb: bad skb (skb = %p, data = %p, th = %p, len = %lu)\n",
49 skb, skb->data, th, skb->len);
50 kfree_skb(skb, FREE_WRITE);
51 return;
52 }
53
54
55
56
57
58
59 if (size == sizeof(struct tcphdr))
60 {
61
62 if(!th->syn && !th->fin)
63 {
64 printk("tcp_send_skb: attempt to queue a bogon.\n");
65 kfree_skb(skb,FREE_WRITE);
66 return;
67 }
68 }
69
70
71
72
73
74 tcp_statistics.TcpOutSegs++;
75 skb->seq = ntohl(th->seq);
76 skb->end_seq = skb->seq + size - 4*th->doff;
77
78
79
80
81
82
83
84
85
86 if (after(skb->end_seq, sk->window_seq) ||
87 (sk->retransmits && sk->ip_xmit_timeout == TIME_WRITE) ||
88 sk->packets_out >= sk->cong_window)
89 {
90
91
92 th->check = 0;
93 if (skb->next != NULL)
94 {
95 printk("tcp_send_partial: next != NULL\n");
96 skb_unlink(skb);
97 }
98 skb_queue_tail(&sk->write_queue, skb);
99
100 if (before(sk->window_seq, sk->write_queue.next->end_seq) &&
101 sk->send_head == NULL && sk->ack_backlog == 0)
102 tcp_reset_xmit_timer(sk, TIME_PROBE0, sk->rto);
103 }
104 else
105 {
106
107
108
109
110 th->ack_seq = htonl(sk->acked_seq);
111 th->window = htons(tcp_select_window(sk));
112
113 tcp_send_check(th, sk->saddr, sk->daddr, size, skb);
114
115 sk->sent_seq = sk->write_seq;
116
117
118
119
120
121
122
123 sk->prot->queue_xmit(sk, skb->dev, skb, 0);
124
125
126 sk->ack_backlog = 0;
127 sk->bytes_rcv = 0;
128
129
130
131
132
133
134
135 tcp_reset_xmit_timer(sk, TIME_WRITE, sk->rto);
136 }
137 }
138
139
140
141
142
143
144
145
146
147
148 struct sk_buff * tcp_dequeue_partial(struct sock * sk)
149 {
150 struct sk_buff * skb;
151 unsigned long flags;
152
153 save_flags(flags);
154 cli();
155 skb = sk->partial;
156 if (skb) {
157 sk->partial = NULL;
158 del_timer(&sk->partial_timer);
159 }
160 restore_flags(flags);
161 return skb;
162 }
163
164
165
166
167
168 void tcp_send_partial(struct sock *sk)
169 {
170 struct sk_buff *skb;
171
172 if (sk == NULL)
173 return;
174 while ((skb = tcp_dequeue_partial(sk)) != NULL)
175 tcp_send_skb(sk, skb);
176 }
177
178
179
180
181
182 void tcp_enqueue_partial(struct sk_buff * skb, struct sock * sk)
183 {
184 struct sk_buff * tmp;
185 unsigned long flags;
186
187 save_flags(flags);
188 cli();
189 tmp = sk->partial;
190 if (tmp)
191 del_timer(&sk->partial_timer);
192 sk->partial = skb;
193 init_timer(&sk->partial_timer);
194
195
196
197 sk->partial_timer.expires = jiffies+HZ;
198 sk->partial_timer.function = (void (*)(unsigned long)) tcp_send_partial;
199 sk->partial_timer.data = (unsigned long) sk;
200 add_timer(&sk->partial_timer);
201 restore_flags(flags);
202 if (tmp)
203 tcp_send_skb(sk, tmp);
204 }
205
206
207
208
209
210
211
212 void tcp_write_xmit(struct sock *sk)
213 {
214 struct sk_buff *skb;
215
216
217
218
219
220
221 if(sk->zapped)
222 return;
223
224
225
226
227
228
229
230
231
232 while((skb = skb_peek(&sk->write_queue)) != NULL &&
233 !after(skb->end_seq, sk->window_seq) &&
234 (sk->retransmits == 0 ||
235 sk->ip_xmit_timeout != TIME_WRITE ||
236 !after(skb->end_seq, sk->rcv_ack_seq))
237 && sk->packets_out < sk->cong_window)
238 {
239 IS_SKB(skb);
240 skb_unlink(skb);
241
242
243
244
245
246 if (before(skb->end_seq, sk->rcv_ack_seq +1))
247 {
248
249
250
251
252
253 sk->retransmits = 0;
254 kfree_skb(skb, FREE_WRITE);
255 if (!sk->dead)
256 sk->write_space(sk);
257 }
258 else
259 {
260 struct tcphdr *th;
261 struct iphdr *iph;
262 int size;
263
264
265
266
267
268
269
270 iph = skb->ip_hdr;
271 th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
272 size = skb->len - (((unsigned char *) th) - skb->data);
273 #ifndef CONFIG_NO_PATH_MTU_DISCOVERY
274 if (size > sk->mtu - sizeof(struct iphdr))
275 {
276 iph->frag_off &= ~htons(IP_DF);
277 ip_send_check(iph);
278 }
279 #endif
280
281 th->ack_seq = htonl(sk->acked_seq);
282 th->window = htons(tcp_select_window(sk));
283
284 tcp_send_check(th, sk->saddr, sk->daddr, size, skb);
285
286 sk->sent_seq = skb->end_seq;
287
288
289
290
291
292 sk->prot->queue_xmit(sk, skb->dev, skb, skb->free);
293
294
295 sk->ack_backlog = 0;
296 sk->bytes_rcv = 0;
297
298
299
300
301
302 tcp_reset_xmit_timer(sk, TIME_WRITE, sk->rto);
303 }
304 }
305 }
306
307
308
309
310
311
312
313 void tcp_do_retransmit(struct sock *sk, int all)
314 {
315 struct sk_buff * skb;
316 struct proto *prot;
317 struct device *dev;
318 int ct=0;
319 struct rtable *rt;
320
321 prot = sk->prot;
322 skb = sk->send_head;
323
324 while (skb != NULL)
325 {
326 struct tcphdr *th;
327 struct iphdr *iph;
328 int size;
329
330 dev = skb->dev;
331 IS_SKB(skb);
332 skb->when = jiffies;
333
334
335
336
337
338
339
340
341
342
343
344 if (skb_device_locked(skb))
345 break;
346
347
348
349
350
351 skb_pull(skb,((unsigned char *)skb->ip_hdr)-skb->data);
352
353
354
355
356
357
358
359
360
361
362 iph = (struct iphdr *)skb->data;
363 th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
364 size = ntohs(iph->tot_len) - (iph->ihl<<2);
365
366
367
368
369
370
371
372
373
374
375 {
376
377
378 struct options * opt = (struct options*)skb->proto_priv;
379 rt = ip_check_route(&sk->ip_route_cache, opt->srr?opt->faddr:iph->daddr, skb->localroute);
380 }
381
382 iph->id = htons(ip_id_count++);
383 #ifndef CONFIG_NO_PATH_MTU_DISCOVERY
384 if (rt && ntohs(iph->tot_len) > rt->rt_mtu)
385 iph->frag_off &= ~htons(IP_DF);
386 #endif
387 ip_send_check(iph);
388
389 if (rt==NULL)
390 {
391 if(skb->sk)
392 {
393 skb->sk->err_soft=ENETUNREACH;
394 skb->sk->error_report(skb->sk);
395 }
396 }
397 else
398 {
399 dev=rt->rt_dev;
400 skb->raddr=rt->rt_gateway;
401 skb->dev=dev;
402 skb->arp=1;
403 if (rt->rt_hh)
404 {
405 memcpy(skb_push(skb,dev->hard_header_len),rt->rt_hh->hh_data,dev->hard_header_len);
406 if (!rt->rt_hh->hh_uptodate)
407 {
408 skb->arp = 0;
409 #if RT_CACHE_DEBUG >= 2
410 printk("tcp_do_retransmit: hh miss %08x via %08x\n", iph->daddr, rt->rt_gateway);
411 #endif
412 }
413 }
414 else if (dev->hard_header)
415 {
416 if(dev->hard_header(skb, dev, ETH_P_IP, NULL, NULL, skb->len)<0)
417 skb->arp=0;
418 }
419
420
421
422
423
424
425
426
427
428
429
430
431 th->ack_seq = htonl(sk->acked_seq);
432 sk->ack_backlog = 0;
433 sk->bytes_rcv = 0;
434 th->window = ntohs(tcp_select_window(sk));
435 tcp_send_check(th, sk->saddr, sk->daddr, size, skb);
436
437
438
439
440
441 if (dev->flags & IFF_UP)
442 {
443
444
445
446
447
448
449
450
451 if (sk && !skb_device_locked(skb))
452 {
453
454 skb_unlink(skb);
455
456 ip_statistics.IpOutRequests++;
457 dev_queue_xmit(skb, dev, sk->priority);
458 }
459 }
460 }
461
462
463
464
465
466 ct++;
467 sk->retransmits++;
468 sk->prot->retransmits++;
469 tcp_statistics.TcpRetransSegs++;
470
471
472
473
474
475
476 if (!all)
477 break;
478
479
480
481
482
483 if (ct >= sk->cong_window)
484 break;
485 skb = skb->link3;
486 }
487 }
488
489
490
491
492
493 void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
494 struct proto *prot, struct options *opt, struct device *dev, int tos, int ttl)
495 {
496 struct sk_buff *buff;
497 struct tcphdr *t1;
498 int tmp;
499 struct device *ndev=NULL;
500
501
502
503
504
505 if(th->rst)
506 return;
507
508
509
510
511
512
513 buff = sock_wmalloc(NULL, MAX_RESET_SIZE, 1, GFP_ATOMIC);
514 if (buff == NULL)
515 return;
516
517 buff->sk = NULL;
518 buff->dev = dev;
519 buff->localroute = 0;
520 buff->csum = 0;
521
522
523
524
525
526 tmp = prot->build_header(buff, saddr, daddr, &ndev, IPPROTO_TCP, opt,
527 sizeof(struct tcphdr),tos,ttl,NULL);
528 if (tmp < 0)
529 {
530 buff->free = 1;
531 sock_wfree(NULL, buff);
532 return;
533 }
534
535 t1 =(struct tcphdr *)skb_put(buff,sizeof(struct tcphdr));
536 memset(t1, 0, sizeof(*t1));
537
538
539
540
541
542 t1->dest = th->source;
543 t1->source = th->dest;
544 t1->doff = sizeof(*t1)/4;
545 t1->rst = 1;
546
547 if(th->ack)
548 {
549 t1->seq = th->ack_seq;
550 }
551 else
552 {
553 t1->ack = 1;
554 if(!th->syn)
555 t1->ack_seq = th->seq;
556 else
557 t1->ack_seq = htonl(ntohl(th->seq)+1);
558 }
559
560 tcp_send_check(t1, saddr, daddr, sizeof(*t1), buff);
561 prot->queue_xmit(NULL, ndev, buff, 1);
562 tcp_statistics.TcpOutSegs++;
563 }
564
565
566
567
568
569 void tcp_send_fin(struct sock *sk)
570 {
571 struct proto *prot =(struct proto *)sk->prot;
572 struct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
573 struct tcphdr *t1;
574 struct sk_buff *buff;
575 struct device *dev=NULL;
576 int tmp;
577
578 buff = sock_wmalloc(sk, MAX_RESET_SIZE,1 , GFP_KERNEL);
579
580 if (buff == NULL)
581 {
582
583 printk("tcp_send_fin: Impossible malloc failure");
584 return;
585 }
586
587
588
589
590
591 buff->sk = sk;
592 buff->localroute = sk->localroute;
593 buff->csum = 0;
594
595
596
597
598
599 tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev,
600 IPPROTO_TCP, sk->opt,
601 sizeof(struct tcphdr),sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache);
602 if (tmp < 0)
603 {
604 int t;
605
606
607
608
609
610 buff->free = 1;
611 sock_wfree(sk,buff);
612 sk->write_seq++;
613 t=del_timer(&sk->timer);
614 if(t)
615 add_timer(&sk->timer);
616 else
617 tcp_reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
618 return;
619 }
620
621
622
623
624
625
626 t1 =(struct tcphdr *)skb_put(buff,sizeof(struct tcphdr));
627 buff->dev = dev;
628 memcpy(t1, th, sizeof(*t1));
629 buff->seq = sk->write_seq;
630 sk->write_seq++;
631 buff->end_seq = sk->write_seq;
632 t1->seq = htonl(buff->seq);
633 t1->ack_seq = htonl(sk->acked_seq);
634 t1->window = htons(sk->window=tcp_select_window(sk));
635 t1->fin = 1;
636 tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), buff);
637
638
639
640
641
642
643 if (skb_peek(&sk->write_queue) != NULL)
644 {
645 buff->free = 0;
646 if (buff->next != NULL)
647 {
648 printk("tcp_send_fin: next != NULL\n");
649 skb_unlink(buff);
650 }
651 skb_queue_tail(&sk->write_queue, buff);
652 }
653 else
654 {
655 sk->sent_seq = sk->write_seq;
656 sk->prot->queue_xmit(sk, dev, buff, 0);
657 tcp_reset_xmit_timer(sk, TIME_WRITE, sk->rto);
658 }
659 }
660
661
662 void tcp_send_synack(struct sock * newsk, struct sock * sk, struct sk_buff * skb)
663 {
664 struct tcphdr *t1;
665 unsigned char *ptr;
666 struct sk_buff * buff;
667 struct device *ndev=NULL;
668 int tmp;
669
670 buff = sock_wmalloc(newsk, MAX_SYN_SIZE, 1, GFP_ATOMIC);
671 if (buff == NULL)
672 {
673 sk->err = ENOMEM;
674 destroy_sock(newsk);
675 kfree_skb(skb, FREE_READ);
676 tcp_statistics.TcpAttemptFails++;
677 return;
678 }
679
680 buff->sk = newsk;
681 buff->localroute = newsk->localroute;
682
683
684
685
686
687 tmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &ndev,
688 IPPROTO_TCP, NULL, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl,&newsk->ip_route_cache);
689
690
691
692
693
694 if (tmp < 0)
695 {
696 sk->err = tmp;
697 buff->free = 1;
698 kfree_skb(buff,FREE_WRITE);
699 destroy_sock(newsk);
700 skb->sk = sk;
701 kfree_skb(skb, FREE_READ);
702 tcp_statistics.TcpAttemptFails++;
703 return;
704 }
705
706 t1 =(struct tcphdr *)skb_put(buff,sizeof(struct tcphdr));
707
708 memcpy(t1, skb->h.th, sizeof(*t1));
709 buff->seq = newsk->write_seq++;
710 buff->end_seq = newsk->write_seq;
711
712
713
714 t1->dest = skb->h.th->source;
715 t1->source = newsk->dummy_th.source;
716 t1->seq = ntohl(buff->seq);
717 newsk->sent_seq = newsk->write_seq;
718 t1->window = ntohs(tcp_select_window(newsk));
719 t1->syn = 1;
720 t1->ack = 1;
721 t1->urg = 0;
722 t1->rst = 0;
723 t1->psh = 0;
724 t1->ack_seq = htonl(newsk->acked_seq);
725 t1->doff = sizeof(*t1)/4+1;
726 ptr = skb_put(buff,4);
727 ptr[0] = 2;
728 ptr[1] = 4;
729 ptr[2] = ((newsk->mtu) >> 8) & 0xff;
730 ptr[3] =(newsk->mtu) & 0xff;
731 buff->csum = csum_partial(ptr, 4, 0);
732 tcp_send_check(t1, newsk->saddr, newsk->daddr, sizeof(*t1)+4, buff);
733 newsk->prot->queue_xmit(newsk, ndev, buff, 0);
734 tcp_reset_xmit_timer(newsk, TIME_WRITE , TCP_TIMEOUT_INIT);
735 skb->sk = newsk;
736
737
738
739
740
741 atomic_sub(skb->truesize, &sk->rmem_alloc);
742 atomic_add(skb->truesize, &newsk->rmem_alloc);
743
744 skb_queue_tail(&sk->receive_queue,skb);
745 sk->ack_backlog++;
746 tcp_statistics.TcpOutSegs++;
747 }
748
749
750
751
752
753 void tcp_send_ack(u32 sequence, u32 ack,
754 struct sock *sk,
755 struct tcphdr *th, u32 daddr)
756 {
757 struct sk_buff *buff;
758 struct tcphdr *t1;
759 struct device *dev = NULL;
760 int tmp;
761
762 if(sk->zapped)
763 return;
764
765
766
767
768
769
770 buff = sock_wmalloc(sk, MAX_ACK_SIZE, 1, GFP_ATOMIC);
771 if (buff == NULL)
772 {
773
774
775
776
777
778
779
780 sk->ack_backlog++;
781 if (sk->ip_xmit_timeout != TIME_WRITE && tcp_connected(sk->state))
782 {
783 tcp_reset_xmit_timer(sk, TIME_WRITE, HZ);
784 }
785 return;
786 }
787
788
789
790
791
792 buff->sk = sk;
793 buff->localroute = sk->localroute;
794 buff->csum = 0;
795
796
797
798
799
800 tmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev,
801 IPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache);
802 if (tmp < 0)
803 {
804 buff->free = 1;
805 sock_wfree(sk, buff);
806 return;
807 }
808 t1 =(struct tcphdr *)skb_put(buff,sizeof(struct tcphdr));
809
810 memcpy(t1, &sk->dummy_th, sizeof(*t1));
811
812
813
814
815
816 t1->dest = th->source;
817 t1->source = th->dest;
818 t1->seq = ntohl(sequence);
819 sk->window = tcp_select_window(sk);
820 t1->window = ntohs(sk->window);
821
822
823
824
825
826
827
828 if (ack == sk->acked_seq) {
829 sk->ack_backlog = 0;
830 sk->bytes_rcv = 0;
831 sk->ack_timed = 0;
832
833 if (sk->send_head == NULL && skb_peek(&sk->write_queue) == NULL
834 && sk->ip_xmit_timeout == TIME_WRITE)
835 if(sk->keepopen)
836 tcp_reset_xmit_timer(sk,TIME_KEEPOPEN,TCP_TIMEOUT_LEN);
837 else
838 delete_timer(sk);
839 }
840
841
842
843
844
845 t1->ack_seq = htonl(ack);
846 tcp_send_check(t1, sk->saddr, daddr, sizeof(*t1), buff);
847 if (sk->debug)
848 printk("\rtcp_ack: seq %x ack %x\n", sequence, ack);
849 sk->prot->queue_xmit(sk, dev, buff, 1);
850 tcp_statistics.TcpOutSegs++;
851 }
852
853
854
855
856
857
858 void tcp_write_wakeup(struct sock *sk)
859 {
860 struct sk_buff *buff,*skb;
861 struct tcphdr *t1;
862 struct device *dev=NULL;
863 int tmp;
864
865 if (sk->zapped)
866 return;
867
868
869
870
871
872
873
874 if (sk->state != TCP_ESTABLISHED &&
875 sk->state != TCP_CLOSE_WAIT &&
876 sk->state != TCP_FIN_WAIT1 &&
877 sk->state != TCP_LAST_ACK &&
878 sk->state != TCP_CLOSING
879 )
880 {
881 return;
882 }
883 if ( before(sk->sent_seq, sk->window_seq) &&
884 (skb=skb_peek(&sk->write_queue)))
885 {
886
887
888
889
890
891
892 struct iphdr *iph;
893 struct tcphdr *th;
894 struct tcphdr *nth;
895 unsigned long win_size;
896 #if 0
897 unsigned long ow_size;
898 #endif
899
900
901
902
903
904 win_size = sk->window_seq - sk->sent_seq;
905
906
907
908
909
910 iph = (struct iphdr *)skb->ip_hdr;
911 th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
912
913
914
915
916
917 buff = sock_wmalloc(sk, win_size + th->doff * 4 +
918 (iph->ihl << 2) +
919 sk->prot->max_header + 15,
920 1, GFP_ATOMIC);
921 if ( buff == NULL )
922 return;
923
924
925
926
927
928
929 buff->free = 1;
930
931 buff->sk = sk;
932 buff->localroute = sk->localroute;
933
934
935
936
937
938 tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
939 IPPROTO_TCP, sk->opt, buff->truesize,
940 sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache);
941 if (tmp < 0)
942 {
943 sock_wfree(sk, buff);
944 return;
945 }
946
947
948
949
950
951 buff->dev = dev;
952
953 nth = (struct tcphdr *) skb_put(buff,sizeof(*th));
954
955 memcpy(nth, th, sizeof(*th));
956
957
958
959
960
961 nth->ack = 1;
962 nth->ack_seq = htonl(sk->acked_seq);
963 nth->window = htons(tcp_select_window(sk));
964 nth->check = 0;
965
966
967
968
969
970 buff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size),
971 win_size + th->doff*4 - sizeof(*th), 0);
972
973
974
975
976
977 buff->end_seq = sk->sent_seq + win_size;
978 sk->sent_seq = buff->end_seq;
979 if(th->urg && ntohs(th->urg_ptr) < win_size)
980 nth->urg = 0;
981
982
983
984
985
986 tcp_send_check(nth, sk->saddr, sk->daddr,
987 nth->doff * 4 + win_size , buff);
988 }
989 else
990 {
991 buff = sock_wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC);
992 if (buff == NULL)
993 return;
994
995 buff->free = 1;
996 buff->sk = sk;
997 buff->localroute = sk->localroute;
998 buff->csum = 0;
999
1000
1001
1002
1003
1004 tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
1005 IPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache);
1006 if (tmp < 0)
1007 {
1008 sock_wfree(sk, buff);
1009 return;
1010 }
1011
1012 t1 = (struct tcphdr *)skb_put(buff,sizeof(struct tcphdr));
1013 memcpy(t1,(void *) &sk->dummy_th, sizeof(*t1));
1014
1015
1016
1017
1018
1019
1020 t1->seq = htonl(sk->sent_seq-1);
1021
1022 t1->ack_seq = htonl(sk->acked_seq);
1023 t1->window = htons(tcp_select_window(sk));
1024 tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), buff);
1025
1026 }
1027
1028
1029
1030
1031
1032 sk->prot->queue_xmit(sk, dev, buff, 1);
1033 tcp_statistics.TcpOutSegs++;
1034 }
1035
1036
1037
1038
1039
1040 void tcp_send_probe0(struct sock *sk)
1041 {
1042 if (sk->zapped)
1043 return;
1044
1045 tcp_write_wakeup(sk);
1046
1047 sk->backoff++;
1048 sk->rto = min(sk->rto << 1, 120*HZ);
1049 sk->retransmits++;
1050 sk->prot->retransmits ++;
1051 tcp_reset_xmit_timer (sk, TIME_PROBE0, sk->rto);
1052 }