IPv4_route: bugfix in route determination.

git-svn-id: svn://kolibrios.org@6475 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2016-08-15 17:27:45 +00:00
parent 9d14a71733
commit b4e2367e09

View File

@ -626,7 +626,7 @@ ipv4_find_fragment_slot:
align 4 align 4
ipv4_output: ipv4_output:
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_output: size=%u ip=0x%x\n", ecx, eax DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_output: size=%u ip=0x%x\n", ecx, edi
cmp ecx, 65500 ; Max IPv4 packet size cmp ecx, 65500 ; Max IPv4 packet size
ja .too_large ja .too_large
@ -986,12 +986,15 @@ ipv4_route:
and ebx, [SUBNET_LIST + edi] and ebx, [SUBNET_LIST + edi]
mov ecx, eax mov ecx, eax
and ecx, [SUBNET_LIST + edi] and ecx, [SUBNET_LIST + edi]
cmp ecx, ebx
je @f je @f
mov eax, [GATEWAY_LIST + edi] mov eax, [GATEWAY_LIST + edi]
@@: @@:
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_route: %u\n", edi
ret ret
.fail: .fail:
DEBUGF DEBUG_NETWORK_ERROR, "IPv4_route failed\n"
xor eax, eax xor eax, eax
ret ret