kernel: add some fixes for kernel 3.9
[openwrt.git] / package / network / utils / ipset / patches / 001-fix-kernel-3.9.patch
1 --- a/kernel/net/netfilter/ipset/ip_set_core.c
2 +++ b/kernel/net/netfilter/ipset/ip_set_core.c
3 @@ -27,6 +27,13 @@
4  #include <linux/netfilter/nfnetlink.h>
5  #include <linux/netfilter/ipset/ip_set.h>
6  
7 +#ifndef IPSET_IN_KERNEL_TREE
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
9 +#define nfnl_unlock() nfnl_unlock(NFNL_SUBSYS_IPSET)
10 +#define nfnl_lock() nfnl_lock(NFNL_SUBSYS_IPSET)
11 +#endif
12 +#endif
13 +
14  static LIST_HEAD(ip_set_type_list);            /* all registered set types */
15  static DEFINE_MUTEX(ip_set_type_mutex);                /* protects ip_set_type_list */
16  static DEFINE_RWLOCK(ip_set_ref_lock);         /* protects the set refs */