diff --git a/Asuro.iso b/Asuro.iso index d4c5baf8..e90159f2 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index ba91b2fa..d80eb504 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index ba91b2fa..d80eb504 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/arp.ppu b/lib/arp.ppu index 13eec398..d43afb5f 100644 Binary files a/lib/arp.ppu and b/lib/arp.ppu differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index 146afd58..31cbb594 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/eth2.ppu b/lib/eth2.ppu index 2ac6645c..944ec227 100644 Binary files a/lib/eth2.ppu and b/lib/eth2.ppu differ diff --git a/lib/ipv4.ppu b/lib/ipv4.ppu index 330ae1e1..e24fc059 100644 Binary files a/lib/ipv4.ppu and b/lib/ipv4.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 3d835f07..18cecefe 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 821e4069..58b72271 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 45ba9e3a..756f81c8 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/net.ppu b/lib/net.ppu index cdd97f75..3a50bbec 100644 Binary files a/lib/net.ppu and b/lib/net.ppu differ diff --git a/lib/shell.ppu b/lib/shell.ppu index 5222ed73..e13c92e2 100644 Binary files a/lib/shell.ppu and b/lib/shell.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index 68c9cb08..762019ed 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/src/driver/net/l2/eth2.pas b/src/driver/net/l2/eth2.pas index 1a81feb3..0e0fb1e5 100644 --- a/src/driver/net/l2/eth2.pas +++ b/src/driver/net/l2/eth2.pas @@ -13,6 +13,7 @@ uses procedure send(p_data : void; p_len : uint16; eth_type : uint16; p_context : PPacketContext); procedure registerType(eType : uint16; RecvCB : TRecvCallback); +procedure registerTypePromisc(eType : uint16; RecvCB : TRecvCallback); procedure register; implementation @@ -23,14 +24,22 @@ uses var Registered : Boolean = false; EthTypes : Array[0..65535] of TRecvCallback; + Promisc : Array[0..65535] of Boolean; MAC : puint8; +procedure registerTypePromisc(eType : uint16; RecvCB : TRecvCallback); +begin + push_trace('eth2.registerType'); + register; + if EthTypes[eType] = nil then EthTypes[eType]:= RecvCB; + Promisc[eType]:= true; +end; + procedure registerType(eType : uint16; RecvCB : TRecvCallback); begin push_trace('eth2.registerType'); register; if EthTypes[eType] = nil then EthTypes[eType]:= RecvCB; - pop_trace; end; procedure send(p_data : void; p_len : uint16; eth_type : uint16; p_context : PPacketContext); @@ -81,7 +90,9 @@ begin copyMAC(@Header^.src[0], @p_context^.MAC.Source[0]); copyMAC(@Header^.dst[0], @p_context^.MAC.Destination[0]); - if MACEqual(@Header^.dst[0], @Header^.src[0]) or MACEqual(@Header^.dst[0], @BROADCAST_MAC[0]) then begin + if MACEqual(@Header^.dst[0], @Header^.src[0]) or + MACEqual(@Header^.dst[0], @BROADCAST_MAC[0]) or + Promisc[proto_type] then begin if EthTypes[proto_type] <> nil then begin EthTypes[proto_type](void(buf), p_len - 14, p_context); end; @@ -98,6 +109,7 @@ begin if not Registered then begin for i:=0 to 65535 do begin EthTypes[i]:= nil; + Promisc[i]:= false; end; net.registerNextLayer(@recv); MAC:= net.getMAC; diff --git a/src/driver/net/l3/arp.pas b/src/driver/net/l3/arp.pas index 351e7d18..2cdc3dbf 100644 --- a/src/driver/net/l3/arp.pas +++ b/src/driver/net/l3/arp.pas @@ -250,7 +250,7 @@ begin push_trace('arp.register'); if not Registered then begin Cache:= LL_New(sizeof(TARPCacheRecord)); - eth2.registerType($0806, @recv); + eth2.registerTypePromisc($0806, @recv); terminal.registerCommand('ARP', @terminal_command_arp, 'Get ARP Table.'); Registered:= true; end; diff --git a/src/include/asuro.pas b/src/include/asuro.pas index c49fa9e2..c8f26213 100644 --- a/src/include/asuro.pas +++ b/src/include/asuro.pas @@ -9,14 +9,14 @@ const VERSION_SUB = '1'; REVISION = '677'; RELEASE = 'ia'; - LINE_COUNT = 28032; + LINE_COUNT = 28044; FILE_COUNT = 90; DRIVER_COUNT = 32; FPC_VERSION = '2.6.4'; NASM_VERSION = '2.10.09'; MAKE_VERSION = '3.81'; COMPILE_DATE = '11/05/18'; - COMPILE_TIME = '09:58:04'; + COMPILE_TIME = '10:09:01'; implementation