summaryrefslogtreecommitdiff
path: root/libnfnetlink
diff options
context:
space:
mode:
authorDanny Rawlins <monster.romster@gmail.com>2016-10-19 22:10:06 +1100
committerDanny Rawlins <monster.romster@gmail.com>2016-10-19 22:10:06 +1100
commit54b55e7c6aeadacb137e9518fd222afb3f18c68d (patch)
treefc450e01b67878fbf6ecbcd08c2e74b243920c96 /libnfnetlink
parent7ad6ee8f059234c682ce415f2ddbdcc7fda3214e (diff)
downloadcontrib-54b55e7c6aeadacb137e9518fd222afb3f18c68d.tar.gz
contrib-54b55e7c6aeadacb137e9518fd222afb3f18c68d.tar.xz
libnfnetlink: sync with kernel headers patch
Diffstat (limited to 'libnfnetlink')
-rw-r--r--libnfnetlink/.md5sum1
-rw-r--r--libnfnetlink/Pkgfile11
-rw-r--r--libnfnetlink/sync_with_kernel_headers.patch110
3 files changed, 117 insertions, 5 deletions
diff --git a/libnfnetlink/.md5sum b/libnfnetlink/.md5sum
index 5f91eba88..a4515eb2c 100644
--- a/libnfnetlink/.md5sum
+++ b/libnfnetlink/.md5sum
@@ -1 +1,2 @@
98927583d2016a9fb1936fed992e2c5e libnfnetlink-1.0.1.tar.bz2
+fbf29c6f189bb46bdd50ce7b90c6c418 sync_with_kernel_headers.patch
diff --git a/libnfnetlink/Pkgfile b/libnfnetlink/Pkgfile
index a417e0268..7d47440f7 100644
--- a/libnfnetlink/Pkgfile
+++ b/libnfnetlink/Pkgfile
@@ -5,15 +5,16 @@
name=libnfnetlink
version=1.0.1
-release=1
-source=(http://www.netfilter.org/projects/$name/files/$name-$version.tar.bz2)
+release=2
+source=(http://www.netfilter.org/projects/$name/files/$name-$version.tar.bz2
+ sync_with_kernel_headers.patch)
build() {
cd $name-$version
- ./configure \
- --prefix=/usr \
- --disable-static
+ patch -p1 -i $SRC/sync_with_kernel_headers.patch
+
+ ./configure --prefix=/usr
make
make DESTDIR=$PKG install
diff --git a/libnfnetlink/sync_with_kernel_headers.patch b/libnfnetlink/sync_with_kernel_headers.patch
new file mode 100644
index 000000000..985b3711e
--- /dev/null
+++ b/libnfnetlink/sync_with_kernel_headers.patch
@@ -0,0 +1,110 @@
+From 7a1a07c0028a1c88cd7716a058697c552a563b24 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sat, 16 May 2015 14:49:07 +0200
+Subject: include: Sync with kernel headers
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ include/libnfnetlink/linux_nfnetlink.h | 44 ++++-----------------------
+ include/libnfnetlink/linux_nfnetlink_compat.h | 12 ++++----
+ 2 files changed, 12 insertions(+), 44 deletions(-)
+
+diff --git a/include/libnfnetlink/linux_nfnetlink.h b/include/libnfnetlink/linux_nfnetlink.h
+index 76a8550..44a38d6 100644
+--- a/include/libnfnetlink/linux_nfnetlink.h
++++ b/include/libnfnetlink/linux_nfnetlink.h
+@@ -25,9 +25,9 @@ enum nfnetlink_groups {
+ /* General form of address family dependent message.
+ */
+ struct nfgenmsg {
+- u_int8_t nfgen_family; /* AF_xxx */
+- u_int8_t version; /* nfnetlink version */
+- u_int16_t res_id; /* resource id */
++ __u8 nfgen_family; /* AF_xxx */
++ __u8 version; /* nfnetlink version */
++ __be16 res_id; /* resource id */
+ };
+
+ #define NFNETLINK_V0 0
+@@ -46,40 +46,8 @@ struct nfgenmsg {
+ #define NFNL_SUBSYS_CTNETLINK_EXP 2
+ #define NFNL_SUBSYS_QUEUE 3
+ #define NFNL_SUBSYS_ULOG 4
+-#define NFNL_SUBSYS_COUNT 5
++#define NFNL_SUBSYS_OSF 5
++#define NFNL_SUBSYS_IPSET 6
++#define NFNL_SUBSYS_COUNT 7
+
+-#ifdef __KERNEL__
+-
+-#include <linux/netlink.h>
+-#include <linux/capability.h>
+-#include <net/netlink.h>
+-
+-struct nfnl_callback
+-{
+- int (*call)(struct sock *nl, struct sk_buff *skb,
+- struct nlmsghdr *nlh, struct nlattr *cda[]);
+- const struct nla_policy *policy; /* netlink attribute policy */
+- const u_int16_t attr_count; /* number of nlattr's */
+-};
+-
+-struct nfnetlink_subsystem
+-{
+- const char *name;
+- __u8 subsys_id; /* nfnetlink subsystem ID */
+- __u8 cb_count; /* number of callbacks */
+- const struct nfnl_callback *cb; /* callback for individual types */
+-};
+-
+-extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
+-extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
+-
+-extern int nfnetlink_has_listeners(unsigned int group);
+-extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
+- int echo);
+-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
+-
+-#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
+- MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
+-
+-#endif /* __KERNEL__ */
+ #endif /* _NFNETLINK_H */
+diff --git a/include/libnfnetlink/linux_nfnetlink_compat.h b/include/libnfnetlink/linux_nfnetlink_compat.h
+index e145176..74b9e55 100644
+--- a/include/libnfnetlink/linux_nfnetlink_compat.h
++++ b/include/libnfnetlink/linux_nfnetlink_compat.h
+@@ -1,6 +1,8 @@
+ #ifndef _NFNETLINK_COMPAT_H
+ #define _NFNETLINK_COMPAT_H
+-#ifndef __KERNEL__
++
++#include <linux/types.h>
++
+ /* Old nfnetlink macros for userspace */
+
+ /* nfnetlink groups: Up to 32 maximum */
+@@ -18,10 +20,9 @@
+ * ! nfnetlink use the same attributes methods. - J. Schulist.
+ */
+
+-struct nfattr
+-{
+- u_int16_t nfa_len;
+- u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
++struct nfattr {
++ __u16 nfa_len;
++ __u16 nfa_type; /* we use 15 bits for the type, and the highest
+ * bit to indicate whether the payload is nested */
+ };
+
+@@ -57,5 +58,4 @@ struct nfattr
+ + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
+ #define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
+
+-#endif /* ! __KERNEL__ */
+ #endif /* _NFNETLINK_COMPAT_H */
+--
+cgit v0.12
+

Generated by cgit