Subversion Repositories Kolibri OS

Rev

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

Rev 1206 Rev 1208
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: 1206 $
17
$Revision: 1208 $
18
 
18
 
19
 
19
 
Line 93... Line 93...
93
	cmp	[eax + SOCKET.Type], IP_PROTO_UDP
93
	cmp	[eax + SOCKET.Type], IP_PROTO_UDP
94
	jne	.next_socket
94
	jne	.next_socket
95
	cmp	[eax + SOCKET.LocalPort], bx
95
	cmp	[eax + SOCKET.LocalPort], bx
96
	jne	.next_socket
96
	jne	.next_socket
Line -... Line 97...
-
 
97
 
-
 
98
	DEBUGF 1,"found socket with matching domain, type and localport\n"
97
 
99
 
98
	; For dhcp, we must allow any remote server to respond.
100
	; For dhcp, we must allow any remote server to respond.
99
	; I will accept the first incoming response to be the one
101
	; I will accept the first incoming response to be the one
100
	; I bind to, if the socket is opened with a destination IP address of
102
	; I bind to, if the socket is opened with a destination IP address of
101
	; 255.255.255.255
103
	; 255.255.255.255
102
	cmp	[eax + SOCKET.RemoteIP], 0xffffffff
104
	cmp	[eax + SOCKET.RemoteIP], 0xffffffff
Line 103... Line 105...
103
	je	.ok1
105
	je	.ok1
104
 
106
 
105
	mov	ebx, [esp]
107
	mov	ebx, [esp]
106
	mov	ebx, [ebx + ETH_FRAME.Data + IPv4_Packet.SourceAddress] ; get the Source address from the IP Packet
108
	mov	ebx, [ebx + ETH_FRAME.Data + IPv4_Packet.SourceAddress] ; get the Source address from the IP Packet   FIXME
Line -... Line 109...
-
 
109
	cmp	[eax + SOCKET.RemoteIP], ebx
-
 
110
	jne	.try_more					      ; Quit if the source IP is not valid, check for more sockets with this IP/PORT combination
107
	cmp	[eax + SOCKET.RemoteIP], eax
111
 
Line 108... Line 112...
108
	jne	.try_more					      ; Quit if the source IP is not valid, check for more sockets with this IP/PORT combination
112
 
Line 109... Line 113...
109
 
113
	DEBUGF 1,"Remote Ip matches\n"