rpms/libnfnetlink/devel .cvsignore, 1.5, 1.6 libnfnetlink-sysheader.patch, 1.1, 1.2 libnfnetlink.spec, 1.9, 1.10 sources, 1.5, 1.6 libnfnetlink-0.0.33-svn7211.patch, 1.1, NONE

Paul P Komkoff Jr (stingray) fedora-extras-commits at redhat.com
Wed Jul 16 20:20:35 UTC 2008


Author: stingray

Update of /cvs/extras/rpms/libnfnetlink/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25081

Modified Files:
	.cvsignore libnfnetlink-sysheader.patch libnfnetlink.spec 
	sources 
Removed Files:
	libnfnetlink-0.0.33-svn7211.patch 
Log Message:
grab latest upstream release


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/libnfnetlink/devel/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore	30 Aug 2007 18:18:13 -0000	1.5
+++ .cvsignore	16 Jul 2008 20:19:47 -0000	1.6
@@ -1 +1 @@
-libnfnetlink-0.0.30.tar.bz2
+libnfnetlink-0.0.39.tar.bz2

libnfnetlink-sysheader.patch:

Index: libnfnetlink-sysheader.patch
===================================================================
RCS file: /cvs/extras/rpms/libnfnetlink/devel/libnfnetlink-sysheader.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- libnfnetlink-sysheader.patch	22 Feb 2008 23:46:36 -0000	1.1
+++ libnfnetlink-sysheader.patch	16 Jul 2008 20:19:48 -0000	1.2
@@ -1,14 +1,14 @@
 diff --git a/include/libnfnetlink/Makefile.am b/include/libnfnetlink/Makefile.am
-index 81e14c8..ad946f0 100644
+index 76128c8..ecd451a 100644
 --- a/include/libnfnetlink/Makefile.am
 +++ b/include/libnfnetlink/Makefile.am
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,2 @@
  
--pkginclude_HEADERS = libnfnetlink.h linux_nfnetlink.h
+-pkginclude_HEADERS = libnfnetlink.h linux_nfnetlink.h linux_nfnetlink_compat.h
+-
 +pkginclude_HEADERS = libnfnetlink.h
- 
 diff --git a/include/libnfnetlink/libnfnetlink.h b/include/libnfnetlink/libnfnetlink.h
-index 37fa663..d8b9516 100644
+index 83874e3..2c29ba9 100644
 --- a/include/libnfnetlink/libnfnetlink.h
 +++ b/include/libnfnetlink/libnfnetlink.h
 @@ -17,7 +17,7 @@
@@ -22,23 +22,14 @@
  #define NETLINK_NETFILTER 12
 diff --git a/include/libnfnetlink/linux_nfnetlink.h b/include/libnfnetlink/linux_nfnetlink.h
 deleted file mode 100644
-index 0f9311d..0000000
+index 76a8550..0000000
 --- a/include/libnfnetlink/linux_nfnetlink.h
 +++ /dev/null
-@@ -1,163 +0,0 @@
+@@ -1,85 +0,0 @@
 -#ifndef _NFNETLINK_H
 -#define _NFNETLINK_H
 -#include <linux/types.h>
--
--#ifndef __KERNEL__
--/* nfnetlink groups: Up to 32 maximum - backwards compatibility for userspace */
--#define NF_NETLINK_CONNTRACK_NEW 		0x00000001
--#define NF_NETLINK_CONNTRACK_UPDATE		0x00000002
--#define NF_NETLINK_CONNTRACK_DESTROY		0x00000004
--#define NF_NETLINK_CONNTRACK_EXP_NEW		0x00000008
--#define NF_NETLINK_CONNTRACK_EXP_UPDATE		0x00000010
--#define NF_NETLINK_CONNTRACK_EXP_DESTROY	0x00000020
--#endif
+-#include <libnfnetlink/linux_nfnetlink_compat.h>
 -
 -enum nfnetlink_groups {
 -	NFNLGRP_NONE,
@@ -59,62 +50,16 @@
 -};
 -#define NFNLGRP_MAX	(__NFNLGRP_MAX - 1)
 -
--/* Generic structure for encapsulation optional netfilter information.
-- * It is reminiscent of sockaddr, but with sa_family replaced
-- * with attribute type. 
-- * ! This should someday be put somewhere generic as now rtnetlink and
-- * ! 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
--				 * bit to indicate whether the payload is nested */
--};
--
--/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
-- * rtnetlink.h, it's time to put this in a generic file */
--
--#define NFNL_NFA_NEST	0x8000
--#define NFA_TYPE(attr) 	((attr)->nfa_type & 0x7fff)
--
--#define NFA_ALIGNTO     4
--#define NFA_ALIGN(len)	(((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
--#define NFA_OK(nfa,len)	((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \
--	&& (nfa)->nfa_len <= (len))
--#define NFA_NEXT(nfa,attrlen)	((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \
--	(struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
--#define NFA_LENGTH(len)	(NFA_ALIGN(sizeof(struct nfattr)) + (len))
--#define NFA_SPACE(len)	NFA_ALIGN(NFA_LENGTH(len))
--#define NFA_DATA(nfa)   ((void *)(((char *)(nfa)) + NFA_LENGTH(0)))
--#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
--#define NFA_NEST(skb, type) \
--({	struct nfattr *__start = (struct nfattr *)skb_tail_pointer(skb); \
--	NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \
--	__start;  })
--#define NFA_NEST_END(skb, start) \
--({      (start)->nfa_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
--        (skb)->len; })
--#define NFA_NEST_CANCEL(skb, start) \
--({      if (start) \
--                skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
--        -1; })
--
 -/* General form of address family dependent message.
 - */
 -struct nfgenmsg {
 -	u_int8_t  nfgen_family;		/* AF_xxx */
 -	u_int8_t  version;		/* nfnetlink version */
--	__be16    res_id;		/* resource id */
+-	u_int16_t    res_id;		/* resource id */
 -};
 -
 -#define NFNETLINK_V0	0
 -
--#define NFM_NFA(n)      ((struct nfattr *)(((char *)(n)) \
--        + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
--#define NFM_PAYLOAD(n)  NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
--
 -/* netfilter netlink message types are split in two pieces:
 - * 8 bit subsystem, 8bit operation.
 - */
@@ -135,49 +80,26 @@
 -
 -#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 nfattr *cda[]);
--	u_int16_t attr_count;	/* number of nfattr's */
+-		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 */
--	struct nfnl_callback *cb; /* callback for individual types */
+-	__u8 subsys_id;			/* nfnetlink subsystem ID */
+-	__u8 cb_count;			/* number of callbacks */
+-	const struct nfnl_callback *cb;	/* callback for individual types */
 -};
 -
--extern void __nfa_fill(struct sk_buff *skb, int attrtype,
--        int attrlen, const void *data);
--#define NFA_PUT(skb, attrtype, attrlen, data) \
--({ if (skb_tailroom(skb) < (int)NFA_SPACE(attrlen)) goto nfattr_failure; \
--   __nfa_fill(skb, attrtype, attrlen, data); })
--
--extern int nfnetlink_subsys_register(struct nfnetlink_subsystem *n);
--extern int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n);
--
--extern void nfattr_parse(struct nfattr *tb[], int maxattr, 
--			struct nfattr *nfa, int len);
--
--#define nfattr_parse_nested(tb, max, nfa) \
--	nfattr_parse((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa)))
--
--#define nfattr_bad_size(tb, max, cta_min)				\
--({	int __i, __res = 0;						\
-- 	for (__i=0; __i<max; __i++) {					\
-- 		if (!cta_min[__i])					\
-- 			continue;					\
-- 		if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){	\
-- 			__res = 1;					\
-- 			break;						\
-- 		}							\
-- 	}								\
-- 	__res;								\
--})
+-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, 
@@ -189,3 +111,70 @@
 -
 -#endif	/* __KERNEL__ */
 -#endif	/* _NFNETLINK_H */
+diff --git a/include/libnfnetlink/linux_nfnetlink_compat.h b/include/libnfnetlink/linux_nfnetlink_compat.h
+deleted file mode 100644
+index e145176..0000000
+--- a/include/libnfnetlink/linux_nfnetlink_compat.h
++++ /dev/null
+@@ -1,61 +0,0 @@
+-#ifndef _NFNETLINK_COMPAT_H
+-#define _NFNETLINK_COMPAT_H
+-#ifndef __KERNEL__
+-/* Old nfnetlink macros for userspace */
+-
+-/* nfnetlink groups: Up to 32 maximum */
+-#define NF_NETLINK_CONNTRACK_NEW 		0x00000001
+-#define NF_NETLINK_CONNTRACK_UPDATE		0x00000002
+-#define NF_NETLINK_CONNTRACK_DESTROY		0x00000004
+-#define NF_NETLINK_CONNTRACK_EXP_NEW		0x00000008
+-#define NF_NETLINK_CONNTRACK_EXP_UPDATE		0x00000010
+-#define NF_NETLINK_CONNTRACK_EXP_DESTROY	0x00000020
+-
+-/* Generic structure for encapsulation optional netfilter information.
+- * It is reminiscent of sockaddr, but with sa_family replaced
+- * with attribute type.
+- * ! This should someday be put somewhere generic as now rtnetlink and
+- * ! 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
+-				 * bit to indicate whether the payload is nested */
+-};
+-
+-/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
+- * rtnetlink.h, it's time to put this in a generic file */
+-
+-#define NFNL_NFA_NEST	0x8000
+-#define NFA_TYPE(attr) 	((attr)->nfa_type & 0x7fff)
+-
+-#define NFA_ALIGNTO     4
+-#define NFA_ALIGN(len)	(((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
+-#define NFA_OK(nfa,len)	((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \
+-	&& (nfa)->nfa_len <= (len))
+-#define NFA_NEXT(nfa,attrlen)	((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \
+-	(struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
+-#define NFA_LENGTH(len)	(NFA_ALIGN(sizeof(struct nfattr)) + (len))
+-#define NFA_SPACE(len)	NFA_ALIGN(NFA_LENGTH(len))
+-#define NFA_DATA(nfa)   ((void *)(((char *)(nfa)) + NFA_LENGTH(0)))
+-#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
+-#define NFA_NEST(skb, type) \
+-({	struct nfattr *__start = (struct nfattr *)skb_tail_pointer(skb); \
+-	NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \
+-	__start;  })
+-#define NFA_NEST_END(skb, start) \
+-({      (start)->nfa_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
+-        (skb)->len; })
+-#define NFA_NEST_CANCEL(skb, start) \
+-({      if (start) \
+-                skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
+-        -1; })
+-
+-#define NFM_NFA(n)      ((struct nfattr *)(((char *)(n)) \
+-        + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
+-#define NFM_PAYLOAD(n)  NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
+-
+-#endif /* ! __KERNEL__ */
+-#endif /* _NFNETLINK_COMPAT_H */


Index: libnfnetlink.spec
===================================================================
RCS file: /cvs/extras/rpms/libnfnetlink/devel/libnfnetlink.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- libnfnetlink.spec	22 Feb 2008 23:46:36 -0000	1.9
+++ libnfnetlink.spec	16 Jul 2008 20:19:48 -0000	1.10
@@ -1,17 +1,16 @@
-%define rev 7211
-%define basever 0.0.30
+# %define rev 7211
+# %define basever 0.0.30
 
 Name:           libnfnetlink
-Version:        0.0.33
-Release: 0.1.svn%{rev}%{?dist}
+Version:        0.0.39
+Release: 1%{?dist}
 Summary:        Netfilter netlink userspace library
 Group:          System Environment/Libraries
 License:        GPL
 URL:            http://netfilter.org
-Source0:        http://netfilter.org/projects/libnfnetlink/files/%{name}-%{basever}.tar.bz2
+Source0:        http://netfilter.org/projects/libnfnetlink/files/%{name}-%{version}.tar.bz2
 Source1:	http://www.gnu.org/licenses/gpl.txt
-Patch0:		libnfnetlink-%{version}-svn%{rev}.patch
-Patch1:		libnfnetlink-sysheader.patch
+Patch0:		libnfnetlink-sysheader.patch
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires:	kernel-headers
 BuildRequires:  automake autoconf libtool
@@ -35,10 +34,9 @@
 and libnfnetlink_queue.
 
 %prep
-%setup -q -n %{name}-%{basever}
+%setup -q
 cp %{SOURCE1} LICENSE
 %patch -p1
-%patch1 -p1
 
 autoreconf -i --force
 
@@ -71,6 +69,9 @@
 %{_includedir}/libnfnetlink/*.h
 
 %changelog
+* Fri Jul  4 2008 Paul P. Komkoff Jr <i at stingr.net> - 0.0.39
+- grab latest upstream release
+
 * Fri Feb 22 2008 Paul P. Komkoff Jr <i at stingr.net> - 0.0.33-0.1.svn7211
 - grab latest upstream changes and fixes, along with new version number
 - do not mess with bundled nfnetlink.h, use <linux/netfilter/nfnetlink.h>


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/libnfnetlink/devel/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources	30 Aug 2007 18:18:13 -0000	1.5
+++ sources	16 Jul 2008 20:19:48 -0000	1.6
@@ -1 +1 @@
-7fd3c8ddc03d42fa9f0177a17a38f163  libnfnetlink-0.0.30.tar.bz2
+348fed8c1edbe5b873ffc7b192140093  libnfnetlink-0.0.39.tar.bz2


--- libnfnetlink-0.0.33-svn7211.patch DELETED ---




More information about the fedora-extras-commits mailing list