diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-04-26 15:14:17 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-04-26 15:14:17 +0200 |
commit | c4172cf85db0eceb0b3dd74a59076d1a52857ff5 (patch) | |
tree | 3d2014f3b8b4b6bee9dc4426badac1b19f10ac7c /compat.h | |
parent | 6a9ee3470814517e13e2b838dee4fcddae8d33e7 (diff) | |
download | modquicktun-c4172cf85db0eceb0b3dd74a59076d1a52857ff5.tar modquicktun-c4172cf85db0eceb0b3dd74a59076d1a52857ff5.zip |
Make modquicktun work on all kernels 2.6.{32..39}
Diffstat (limited to 'compat.h')
-rw-r--r-- | compat.h | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -7,6 +7,7 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) + static inline struct rtable *ip_route_output_ports(struct net *net, struct sock *sk, __be32 daddr, __be32 saddr, __be16 dport, __be16 sport, @@ -31,6 +32,41 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct sock return rt; } + +#endif + + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + +static inline void __skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) +{ + skb->dev = dev; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + skb->rxhash = 0; +#endif + + skb_set_queue_mapping(skb, 0); + skb_dst_drop(skb); + nf_reset(skb); +} + +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + +#define RTABLE_DST(rtable) (&(rtable)->u.dst) + +#else + +#define RTABLE_DST(rtable) (&(rtable)->dst) + +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) + +#define rcu_dereference_protected(p, c) rcu_dereference(p) + #endif #endif /* __QUICKTUN_COMPAT_H */ |