X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Frouting.c;h=ed3814bb6d7e06634522dd7af8d58b326646d0c2;hb=015f48988e0ff398409d71dfc692005ab439490a;hp=d9efa99f4e0392c37b6980b915370a0f29649047;hpb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/routing.c b/KernelLand/Modules/IPStack/routing.c index d9efa99f..ed3814bb 100644 --- a/KernelLand/Modules/IPStack/routing.c +++ b/KernelLand/Modules/IPStack/routing.c @@ -18,7 +18,7 @@ extern tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Filename); // === PROTOTYPES === // - Routes directory int IPStack_RouteDir_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]); -tVFS_Node *IPStack_RouteDir_FindDir(tVFS_Node *Node, const char *Name); +tVFS_Node *IPStack_RouteDir_FindDir(tVFS_Node *Node, const char *Name, Uint Flags); tVFS_Node *IPStack_RouteDir_MkNod(tVFS_Node *Node, const char *Name, Uint Flags); int IPStack_RouteDir_Unlink(tVFS_Node *Node, const char *OldName); tRoute *_Route_FindExactRoute(int Type, void *Network, int Subnet, int Metric); @@ -78,7 +78,7 @@ int IPStack_RouteDir_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]) /** * \brief FindDir for the /Devices/ip/routes/ directory */ -tVFS_Node *IPStack_RouteDir_FindDir(tVFS_Node *Node, const char *Name) +tVFS_Node *IPStack_RouteDir_FindDir(tVFS_Node *Node, const char *Name, Uint Flags) { // Interpret the name as :, returning the interface for // needed to access that address. @@ -115,12 +115,13 @@ tVFS_Node *IPStack_RouteDir_FindDir(tVFS_Node *Node, const char *Name) { LOG("Why does this route not have a node? trying to find an iface for the next hop"); - rt = _Route_FindInterfaceRoute(type, rt->NextHop); - if(!rt) { + void *nextrt = _Route_FindInterfaceRoute(type, rt->NextHop); + if(!nextrt) { Log_Notice("Cannot find route to next hop '%s'", IPStack_PrintAddress(type, rt->NextHop)); return NULL; } + rt = nextrt; } if( !rt->Interface ) { Log_Notice("Routes", "No interface for route %p, what the?", rt);