Subversion Repositories Kolibri OS

Rev

Rev 2942 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2942 Rev 2946
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: 2942 $
17
$Revision: 2946 $
18
 
18
 
19
;-----------------------------------------------------------------
19
;-----------------------------------------------------------------
20
;
20
;
Line 249... Line 249...
249
        pop     [ebx + TCP_SOCKET.ts_val]
249
        pop     [ebx + TCP_SOCKET.ts_val]
250
        push    dword [esi + 6]                 ; timestamp echo reply
250
        push    dword [esi + 6]                 ; timestamp echo reply
251
        pop     [ebx + TCP_SOCKET.ts_ecr]
251
        pop     [ebx + TCP_SOCKET.ts_ecr]
252
        or      [ebx + TCP_SOCKET.temp_bits], TCP_BIT_TIMESTAMP
252
        or      [ebx + TCP_SOCKET.temp_bits], TCP_BIT_TIMESTAMP
Line -... Line 253...
-
 
253
 
-
 
254
        ; Since we have a timestamp, lets do the paws test right away!
-
 
255
 
-
 
256
        test    [edx + TCP_header.Flags], TH_RST
-
 
257
        jnz     .no_paws
-
 
258
 
-
 
259
        mov     eax, [ebx + TCP_SOCKET.ts_recent]
-
 
260
        test    eax, eax
-
 
261
        jz      .no_paws
-
 
262
        cmp     eax, [ebx + TCP_SOCKET.ts_val]
-
 
263
        jge     .no_paws
-
 
264
 
-
 
265
        DEBUGF  1,"TCP_input: PAWS: detected an old segment\n"
-
 
266
 
-
 
267
        mov     eax, [esp+4+4]                          ; tcp_now
-
 
268
        sub     eax, [ebx + TCP_SOCKET.ts_recent_age]
-
 
269
        cmp     eax, TCP_PAWS_IDLE
-
 
270
        jle     .dropafterack                           ; TODO: update stats
-
 
271
 
-
 
272
        mov     [ebx + TCP_SOCKET.ts_recent], 0         ; timestamp was invalid, fix it.
-
 
273
  .no_paws:
253
 
274
 
254
        add     esi, 10
275
        add     esi, 10
Line 255... Line 276...
255
        jmp     .opt_loop
276
        jmp     .opt_loop
Line 440... Line 461...
440
        cmp     [ebx + TCP_SOCKET.t_state], TCPS_SYN_SENT
461
        cmp     [ebx + TCP_SOCKET.t_state], TCPS_SYN_SENT
441
        je      .SYN_SENT
462
        je      .SYN_SENT
Line 442... Line 463...
442
 
463
 
Line 443... Line -...
443
        DEBUGF  1,"TCP_input: state is not listen or syn_sent\n"
-
 
444
 
-
 
445
;--------------------------------------------
-
 
446
; Protection Against Wrapped Sequence Numbers
-
 
447
 
-
 
448
; First, check if timestamp is present
-
 
449
 
-
 
450
;;;; TODO 602
-
 
451
 
-
 
452
; Then, check if at least some bytes of data are within window
-
 
453
 
-
 
454
;;;; TODO
-
 
455
 
-
 
456
 
-
 
457
 
-
 
458
 
-
 
459
 
-
 
460
 
-
 
461
 
464
        DEBUGF  1,"TCP_input: state is not listen or syn_sent\n"
462
 
465
 
Line 463... Line 466...
463
;----------------------------
466
;----------------------------