From: Vikas K. <ka...@co...> - 2004-04-04 03:39:43
|
I spent the last few hours trying to debug route_check.o, and in the process managed to irrepairably corrupt my filesystem. Before that I could discover that the problem is essentially due to redefinition of some netfilter symbols in newer kernel. Hence there are unresolved symbols and null pointer dereferencing. route_check.o works for stock 2.4.18 downloaded off http://www.kernel.org/pub/linux/kernel/v2.4/ After some effort it could be made to work with later kernels. But then it may not work with 2.4.18. In general it appears messy to keep the module uptodate with kernel versions. I now believe that ASL should do away with route_check.o and become truly and completely a userspace library. Let me present my case. route_check.o is there to duplicate route caching information which the kernel already maintains but does not output to /proc/net/rt_cache. route_check.o was written since we did not want to change the kernel source AT ALL. See section 4.1.2 of the paper: http://aslib.sourceforge.net/papers/HTML-paper-327/index.html It turns out there is another way to get the last_use_time out of the kernel, and that is through a NETLINK socket. The popular tool iproute2 does that. For example try the command: ip -s -s route list cache What we want is the "age field". The information is there in the output, we could put it to a file and grep it or something. But thats ugly. So what ASL really should do is open a netlink socket to the kernel and read this route cache information. This would have to be done in the function query_route_idle_time() in libASL/api.c. This is in essence a replication of part of what iproute2 does. The source of iproute2 is here: (http://www-courses.cs.uiuc.edu/~cs397hou/iproute2-2.4.7-now-ss010824.tar.gz) The relevant function is rtnl_rtcache_request(struct rtnl_handle *rth, int family) in ip/iproute.c and the file lib/libnetlink.c. So one needs to carefully look into these two files and incorporate that functionality in query_route_idle_time(). Effect on AODV. -------------- AODV uses route_check.o in a more complicated way through the function query_route_idle_time_aodv(addr_t k, int destination_flag) defined in ASL-a. This is to support a seemingly redundant subte optimization, see section 5.1.3 of the above paper. We could do away with it at the risk of not completely complying with the AODV draft. In anycase, query_route_idle_time_aodv() can also be modified to use all the information it needs from the kernel cache. I have outlined my thoughts and possible options. I would appreciate input from the list. The changes I propose are straightforward but tedious. Rolling out a well tested new version may be 3-4 days of hard work. Unfortunately I am really caught up in other work, and cant afford to do this for another 2 weeks or so at least. In the unlikely event that someone on the list feels motivated, I would be glad to help. Inputs on the proposed changes are appreciated anyways. Thanks -vikas |