IP drops re-injected packets !!!

binita gupta (binita@students.uiuc.edu)
Mon, 4 Mar 2002 23:39:27 -0600 (CST)


I am trying to implement an on demand routing protocol for ad-hoc
wireless networks. for this I intercept packets at the IP layer
(using netfilter), queue them in the user space and reinject them
(after route has been discovered) at the IP layer using tun device.

Everyting works fine except that IP drops the re-injected packets.
Basically "fib_validate_source" drops all the packets with local address
as the source address and this is the reason why all the reinjected
packets are being dropped. I could get away with this problem by modifying
fib_validate_source function in fin_frontend.c file as follows:

--if(res.type != RTN_UNICAST)
++if((res.type != RTN_UNICAST) && (res.type != RTN_LOCAL))

I am just wondering if this is the right fix for the problem or should
this be handled in some other way?

In any case I am not clear how the current kernel handles the reinjected
packets which are generated locally? Is this a bug in the kernel or am I
missing something here?

any clarifications will be highly appreciated.

Thanx,
-Binita

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/