From: Pravin B Shelar Date: Mon, 5 Nov 2012 21:39:00 +0000 (-0800) Subject: datapath: enable encap for capwap. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2315e6b5bc8da2aa690cd977fdd89543bb435488;p=openvswitch datapath: enable encap for capwap. kernel 3.5 added a switch to turn on UDP encap, capwap needs to enable it. Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross --- diff --git a/datapath/linux/compat/include/linux/udp.h b/datapath/linux/compat/include/linux/udp.h index 6fe4721b..6a805b58 100644 --- a/datapath/linux/compat/include/linux/udp.h +++ b/datapath/linux/compat/include/linux/udp.h @@ -10,4 +10,9 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) } #endif /* HAVE_SKBUFF_HEADER_HELPERS */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) +static inline void udp_encap_enable(void) +{ +} +#endif #endif diff --git a/datapath/vport-capwap.c b/datapath/vport-capwap.c index 39aec423..4061c7b1 100644 --- a/datapath/vport-capwap.c +++ b/datapath/vport-capwap.c @@ -445,7 +445,7 @@ static int init_socket(struct net *net) capwap_net->frag_state.low_thresh = CAPWAP_FRAG_PRUNE_MEM; inet_frags_init_net(&capwap_net->frag_state); - + udp_encap_enable(); capwap_net->n_tunnels++; return 0;