the tun device's pointopoint link and source address check

From: Ritesh Kumar
Date: Fri Oct 28 2005 - 14:27:40 EST


Hi,
While experimenting with the tun device I found that I was not
able to receive packets on the tun interface (i.e. a udp listener for
packets couldn't get the packets transmitted from the program which
wrote to /dev/net/tun), if the source address of the packet was not
equal to end point IP address of the tun pointopoint link. It seemed
that internally, linux dropped a packet it saw on the tun interface
(tcpdump on the tun interface shows the packet) because its source
address didn't match the IP address of the pointopoint end host of the
tun interface.
My question is, can this check be disabled? I assume the PPP
driver (which is also a pointopoint link driver) disables this check,
otherwise it would have been impossible to route packets from the
internet through PPP to the end host (Or does PPP use some form of
tunneling?).
I also couldn't find the place where this check is actually made
in linux. I went from the tun driver code
drivers/net/tun.c:tun_get_user --> net/core/dev.c:netif_rx_ni -->
net/core/dev.c:netif_rx. However, then I found that this packet was
scheduled for later dispatch and couldn't figure out where to look
next. Can somebody help me here too please?

Ritesh
--
http://www.cs.unc.edu/~ritesh/
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html