Rev 5363 | Rev 5522 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5363 | Rev 5442 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | ;; GNU GENERAL PUBLIC LICENSE ;; |
12 | ;; GNU GENERAL PUBLIC LICENSE ;; |
13 | ;; Version 2, June 1991 ;; |
13 | ;; Version 2, June 1991 ;; |
14 | ;; ;; |
14 | ;; ;; |
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 16... | Line 16... | ||
16 | 16 | ||
Line 17... | Line 17... | ||
17 | $Revision: 5363 $ |
17 | $Revision: 5442 $ |
18 | 18 | ||
19 | ;----------------------------------------------------------------- |
19 | ;----------------------------------------------------------------- |
20 | ; |
20 | ; |
Line 392... | Line 392... | ||
392 | mov eax, [timestamp] |
392 | mov eax, [timestamp] |
393 | sub eax, [ebx + TCP_SOCKET.ts_recent_age] |
393 | sub eax, [ebx + TCP_SOCKET.ts_recent_age] |
Line 394... | Line 394... | ||
394 | 394 | ||
395 | pop ecx |
395 | pop ecx |
396 | cmp eax, TCP_PAWS_IDLE |
396 | cmp eax, TCP_PAWS_IDLE |
397 | jle .drop_after_ack ; TODO: update stats |
397 | jle .paws_drop |
398 | push ecx |
- | |
399 | 398 | push ecx |
|
400 | mov [ebx + TCP_SOCKET.ts_recent], 0 ; timestamp was invalid, fix it. |
399 | mov [ebx + TCP_SOCKET.ts_recent], 0 ; timestamp was invalid, fix it. |
401 | .no_paws: |
400 | .no_paws: |
Line -... | Line 401... | ||
- | 401 | jmp .opt_loop |
|
- | 402 | ||
- | 403 | .paws_drop: |
|
- | 404 | inc [TCPS_rcvduppack] ; update stats |
|
- | 405 | add [TCPS_rcvdupbyte], ecx |
|
- | 406 | inc [TCPS_pawsdrop] |
|
402 | jmp .opt_loop |
407 | jmp .drop_after_ack |
Line 403... | Line 408... | ||
403 | 408 | ||
Line 404... | Line 409... | ||
404 | .no_options: |
409 | .no_options: |
Line 628... | Line 633... | ||
628 | ; send an ACK and resynchronize and drop any data. |
633 | ; send an ACK and resynchronize and drop any data. |
629 | ; But keep on processing for RST or ACK |
634 | ; But keep on processing for RST or ACK |
630 | or [ebx + TCP_SOCKET.t_flags], TF_ACKNOW |
635 | or [ebx + TCP_SOCKET.t_flags], TF_ACKNOW |
631 | mov eax, ecx |
636 | mov eax, ecx |
Line -... | Line 637... | ||
- | 637 | ||
- | 638 | inc [TCPS_rcvpartduppack] |
|
632 | 639 | ||
Line 633... | Line 640... | ||
633 | ;;; TODO: update stats |
640 | ;;; TODO: update stats |
634 | 641 | ||
Line 660... | Line 667... | ||
660 | test ecx, ecx |
667 | test ecx, ecx |
661 | jz .not_terminated |
668 | jz .not_terminated |
Line 662... | Line 669... | ||
662 | 669 | ||
663 | mov eax, ebx |
670 | mov eax, ebx |
664 | call TCP_close |
671 | call TCP_close |
665 | ;;; TODO: update stats |
672 | inc [TCPS_rcvafterclose] |
Line 666... | Line 673... | ||
666 | jmp .respond_seg_reset |
673 | jmp .respond_seg_reset |
667 | 674 | ||
Line 983... | Line 990... | ||
983 | mov [ebx + TCP_SOCKET.t_dupacks], 0 |
990 | mov [ebx + TCP_SOCKET.t_dupacks], 0 |
Line 984... | Line 991... | ||
984 | 991 | ||
985 | mov eax, [edx + TCP_header.AckNumber] |
992 | mov eax, [edx + TCP_header.AckNumber] |
986 | cmp eax, [ebx + TCP_SOCKET.SND_MAX] |
993 | cmp eax, [ebx + TCP_SOCKET.SND_MAX] |
987 | jbe @f |
- | |
988 | 994 | jbe @f |
|
989 | ;;; TODO: update stats |
995 | inc [TCPS_rcvacktoomuch] |
990 | jmp .drop_after_ack |
- | |
991 | 996 | jmp .drop_after_ack |
|
Line 992... | Line 997... | ||
992 | @@: |
997 | @@: |
993 | 998 | ||
994 | mov edi, [edx + TCP_header.AckNumber] |
- | |
995 | sub edi, [ebx + TCP_SOCKET.SND_UNA] ; now we got the number of acked bytes in edi |
999 | mov edi, [edx + TCP_header.AckNumber] |
996 | - | ||
- | 1000 | sub edi, [ebx + TCP_SOCKET.SND_UNA] ; now we got the number of acked bytes in edi |
|
997 | ;;; TODO: update stats |
1001 | inc [TCPS_rcvackpack] |
Line 998... | Line 1002... | ||
998 | 1002 | add [TCPS_rcvackbyte], edi |
|
999 | DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: acceptable ACK for %u bytes\n", edi |
1003 | DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: acceptable ACK for %u bytes\n", edi |
Line 1207... | Line 1211... | ||
1207 | jnz .drop_with_reset |
1211 | jnz .drop_with_reset |
Line 1208... | Line 1212... | ||
1208 | 1212 | ||
1209 | test [edx + TCP_header.Flags], TH_SYN |
1213 | test [edx + TCP_header.Flags], TH_SYN |
Line -... | Line 1214... | ||
- | 1214 | jz .drop |
|
- | 1215 | ||
1210 | jz .drop |
1216 | inc [TCPS_accepts] ; update stats |
Line 1211... | Line 1217... | ||
1211 | 1217 | ||
1212 | ;;; TODO: check if it's a broadcast or multicast, and drop if so |
1218 | ;;; TODO: check if it's a broadcast or multicast, and drop if so |