Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
---------------------------------------------------------------
commit d8179084adf5cf846c08d9f432246ca632994ca5
Merge: d7cc20f a6ad857
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Mon Oct 15 02:58:05 2012 +0800
Merge branch 'next'
Conflicts:
compat.h
---------------------------------------------------------------
d8179084adf5cf846c08d9f432246ca632994ca5
compat.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --cc compat.h
index 6fa4f94,081bef5..0caf43b
--- a/compat.h
+++ b/compat.h
@@@ -136,8 -144,12 +136,13 @@@ void batadv_free_rcu_gw_node(struct rcu
void batadv_free_rcu_neigh_node(struct rcu_head *rcu);
void batadv_free_rcu_tt_local_entry(struct rcu_head *rcu);
void batadv_free_rcu_backbone_gw(struct rcu_head *rcu);
+void batadv_free_rcu_dat_entry(struct rcu_head *rcu);
+ static inline void skb_reset_mac_len(struct sk_buff *skb)
+ {
+ skb->mac_len = skb->network_header - skb->mac_header;
+ }
+
#endif /* < KERNEL_VERSION(3, 0, 0) */
@@@ -150,14 -162,23 +155,33 @@@ static inline void eth_hw_addr_random(s
#endif /* < KERNEL_VERSION(3, 4, 0) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
+
+#define net_ratelimited_function(func, ...) \
+ do { \
+ if (net_ratelimit()) \
+ func(__VA_ARGS__); \
+ } while (0)
+
+#endif /* < KERNEL_VERSION(3, 5, 0) */
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+
+ /* hack for not correctly set mac_len. This may happen for some special
+ * configurations like batman-adv on VLANs.
+ *
+ * This is pretty dirty, but we only use skb_share_check() in main.c right
+ * before mac_len is checked, and the recomputation shouldn't hurt too much.
+ */
+ #define skb_share_check(skb, b) \
+ ({ \
+ struct sk_buff *_t_skb; \
+ _t_skb = skb_share_check(skb, b); \
+ if (_t_skb) \
+ skb_reset_mac_len(_t_skb); \
+ _t_skb; \
+ })
+
+ #endif /* < KERNEL_VERSION(3, 8, 0) */
+
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */