]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/ipv4/udp.c
[UDP]: Introduce UDP encapsulation type for L2TP
authorJames Chapman <jchapman@katalix.com>
Wed, 27 Jun 2007 22:37:46 +0000 (15:37 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:15:57 +0000 (22:15 -0700)
commit342f0234c71b40da785dd6a7ce1dd481ecbfdb81
treeb6d7295cd484449f3f6478fe3e796fc8988534a3
parent4417da668c0021903464f92db278ddae348e0299
[UDP]: Introduce UDP encapsulation type for L2TP

This patch adds a new UDP_ENCAP_L2TPINUDP encapsulation type for UDP
sockets. When a UDP socket's encap_type is UDP_ENCAP_L2TPINUDP, the
skb is delivered to a function pointed to by the udp_sock's
encap_rcv funcptr. If the skb isn't wanted by L2TP, it returns >0, which
causes it to be passed through to UDP.

Include padding to put the new encap_rcv field on a 4-byte boundary.

Previously, the only user of UDP encap sockets was ESP, so when
CONFIG_XFRM was not defined, some of the encap code was compiled
out. This patch changes that. As a result, udp_encap_rcv() will
now do a little more work when CONFIG_XFRM is not defined.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/udp.h
net/ipv4/udp.c