the tun device's pointopoint link and source address check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/
-
: 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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux