On Sat, Oct 27, 2012 at 1:07 PM, Pravin B Shelar <pshe...@nicira.com> wrote: > kernel 3.5 added a switch to turn on UDP encap, capwap needs > to enable it. > > Signed-off-by: Pravin B Shelar <pshe...@nicira.com> > --- > datapath/linux/compat/include/linux/udp.h | 5 +++++ > datapath/vport-capwap.c | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/datapath/linux/compat/include/linux/udp.h > b/datapath/linux/compat/include/linux/udp.h > index 6fe4721..6a805b5 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 a113af6..a6d194a 100644 > --- a/datapath/vport-capwap.c > +++ b/datapath/vport-capwap.c > @@ -445,8 +445,8 @@ 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); > - > capwap_net->n_tunnels++; > + udp_encap_enable();
Can we just move this up a few lines so that incrementing the refcount is the last thing that we do? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev