From f0bcb2828ee9c929835ef4e089ff6a90789dc368 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 12 Apr 2012 23:09:15 +0000 Subject: [PATCH] Bugfixes for ethernet and IPv4 (net branch) git-svn-id: svn://kolibrios.org@2607 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/net/network/IPv4.inc | 2 +- kernel/branches/net/network/ethernet.inc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/branches/net/network/IPv4.inc b/kernel/branches/net/network/IPv4.inc index 3c18784cfd..e6b5763870 100644 --- a/kernel/branches/net/network/IPv4.inc +++ b/kernel/branches/net/network/IPv4.inc @@ -646,7 +646,7 @@ IPv4_output: .eth_error: DEBUGF 1,"IPv4_output: ethernet error\n" - add esp, 6+2+4 + add esp, 3*4+2*2+6 sub edi, edi ret diff --git a/kernel/branches/net/network/ethernet.inc b/kernel/branches/net/network/ethernet.inc index 6501e788ba..40ca94ab52 100644 --- a/kernel/branches/net/network/ethernet.inc +++ b/kernel/branches/net/network/ethernet.inc @@ -136,14 +136,15 @@ ETH_output: lea edx, [ecx + sizeof.ETH_header] ; Set edx to complete buffer size cmp edx, ETH_FRAME_MINIMUM - jb .adjust_size + jbe .adjust_size + .done: DEBUGF 1,"ETH_output: done: %x total size: %u\n", eax, edx ret .adjust_size: mov edx, ETH_FRAME_MINIMUM test edx, edx ; clear zero flag - ret + jmp .done .out_of_ram: DEBUGF 2,"ETH_output: Out of ram space!!\n"