From 44efbc259d1ac0b67189839c9de20acd71ec1db0 Mon Sep 17 00:00:00 2001 From: Izaya Date: Fri, 16 Mar 2018 17:15:40 +1100 Subject: [PATCH] fixed cached routing over tunnels --- OpenOS/etc/rc.d/minitel.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenOS/etc/rc.d/minitel.lua b/OpenOS/etc/rc.d/minitel.lua index f68d9b7..e690527 100644 --- a/OpenOS/etc/rc.d/minitel.lua +++ b/OpenOS/etc/rc.d/minitel.lua @@ -88,9 +88,11 @@ function start() local function sendPacket(packetID,packetType,dest,sender,vport,data) if rcache[dest] then + dprint("Cached", rcache[dest][1],"send",rcache[dest][2],port,packetID,packetType,dest,sender,vport,data) if component.type(rcache[dest][1]) == "modem" then - dprint("Cached", rcache[dest][1],"send",rcache[dest][2],port,packetID,packetType,dest,sender,vport,data) component.invoke(rcache[dest][1],"send",rcache[dest][2],port,packetID,packetType,dest,sender,vport,data) + elseif component.type(rcache[dest][1]) == "tunnel" then + component.invoke(rcache[dest][1],"send",packetID,packetType,dest,sender,vport,data) end else dprint("Not cached", port,packetID,packetType,dest,sender,vport,data)