ipset: Backports for the nla_put_net64() API changes
PATCH 1/1 ipset: Backports for the nla_put_net64() API changes
* Backports the patch "libnl: nla_put_net64():align on a 64-bit area" [1] by Nicolas Dichtel <[email protected]>
* Since the nla_put_net64() API has been changed, therefore, the ip_set_compat.h.in should provides the macro IPSET_NLA_PUT_NET64 that point to the nla_put_net64() with appropriate number of arguments.
The build script should distinguish the API changes by detect for the existence of nla_put_64bit() function in include/net/netlink.h. This function was added in the same patches set and called by the nla_put_be64() that called by nla_put_net64() respectively.
--- configure.ac | 10 ++++++++++ kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 7 +++++++ kernel/include/linux/netfilter/ipset/ip_set_counter.h | 10 ++++++---- kernel/include/linux/netfilter/ipset/ip_set_skbinfo.h | 7 ++++--- kernel/include/uapi/linux/netfilter/ipset/ip_set.h | 1 + 5 files changed, 28 insertions(+), 7 deletions(-)
configure.ac +10 -0
@@ -250,6 +250,16 @@ else AC_SUBST(HAVE_NLA_PUT_BE64, undef) fi +AC_MSG_CHECKING([kernel source for nla_put_64bit]) +if test -f $ksourcedir/include/net/netlink.h && \ + $GREP -q 'nla_put_64bit' $ksourcedir/include/net/netlink.h; then + AC_MSG_RESULT(yes) + AC_SUBST(HAVE_NLA_PUT_64BIT, define) +else + AC_MSG_RESULT(no) + AC_SUBST(HAVE_NLA_PUT_64BIT, undef) +fi + AC_MSG_CHECKING([kernel source for portid in nl_info]) if test -f $ksourcedir/include/linux/netlink.h && \ $AWK '/^struct netlink_skb_parms/ {for(i=1; i<=5; i++) {getline; print}}' $ksourcedir/include/linux/netlink.h | $GREP -q 'portid;'; then
kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +7 -0
@@ -10,6 +10,7 @@ #@HAVE_ETHER_ADDR_EQUAL@ HAVE_ETHER_ADDR_EQUAL #@HAVE_NLA_PUT_BE16@ HAVE_NLA_PUT_BE16 #@HAVE_NLA_PUT_BE64@ HAVE_NLA_PUT_BE64 +#@HAVE_NLA_PUT_64BIT@ HAVE_NLA_PUT_64BIT #@HAVE_NL_INFO_PORTID@ HAVE_NL_INFO_PORTID #define HAVE_NETLINK_DUMP_START_ARGS @HAVE_NETLINK_DUMP_START_ARGS@ #@HAVE_NS_CAPABLE@ HAVE_NS_CAPABLE
@@ -160,6 +161,12 @@ static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value) } #endif +#ifdef HAVE_NLA_PUT_64BIT +#define IPSET_NLA_PUT_NET64(skb, t, v, pa) nla_put_be64(skb, t, v, pa) +#else +#define IPSET_NLA_PUT_NET64(skb, t, v, pa) nla_put_be64(skb, t, v) +#endif + #ifdef HAVE_NL_INFO_PORTID #define NETLINK_PORTID(skb) NETLINK_CB(skb).portid #else
kernel/include/linux/netfilter/ipset/ip_set_counter.h +6 -4
@@ -53,10 +53,12 @@ ip_set_update_counter(struct ip_set_counter *counter,static inline bool ip_set_put_counter (struct sk_buff *skb,const struct ip_set_counter *counter) { -return nla_put_net64 (skb,IPSET_ATTR_BYTES , -cpu_to_be64 (ip_set_get_bytes (counter))) || -nla_put_net64 (skb,IPSET_ATTR_PACKETS , -cpu_to_be64 (ip_set_get_packets (counter))); +return IPSET_NLA_PUT_NET64 (skb,IPSET_ATTR_BYTES , +cpu_to_be64 (ip_set_get_bytes (counter)), +IPSET_ATTR_PAD ) || +IPSET_NLA_PUT_NET64 (skb,IPSET_ATTR_PACKETS , +cpu_to_be64 (ip_set_get_packets (counter)), +IPSET_ATTR_PAD ); } static inline void
kernel/include/linux/netfilter/ipset/ip_set_skbinfo.h +4 -3
@@ -23,9 +23,10 @@ ip_set_put_skbinfo(struct sk_buff *skb, const struct ip_set_skbinfo *skbinfo) {/* Send nonzero parameters only */ return ((skbinfo->skbmark || skbinfo->skbmarkmask) && -nla_put_net64 (skb,IPSET_ATTR_SKBMARK , -cpu_to_be64 ((u64 )skbinfo->skbmark <<32 | - skbinfo->skbmarkmask))) || +IPSET_NLA_PUT_NET64 (skb,IPSET_ATTR_SKBMARK , +cpu_to_be64 ((u64 )skbinfo->skbmark <<32 | + skbinfo->skbmarkmask), +IPSET_ATTR_PAD )) || (skbinfo->skbprio &&nla_put_net32 (skb,IPSET_ATTR_SKBPRIO , cpu_to_be32(skbinfo->skbprio))) ||
kernel/include/uapi/linux/netfilter/ipset/ip_set.h +1 -0
@@ -118,6 +118,7 @@ enum {IPSET_ATTR_SKBMARK ,IPSET_ATTR_SKBPRIO ,IPSET_ATTR_SKBQUEUE , +IPSET_ATTR_PAD , __IPSET_ATTR_ADT_MAX, };#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
Signature · 1 line
2.8.1
Pablo Neira Ayuso
maintainerQuoted 11 lines · Neutron Soutmun
* Backports the patch "libnl: nla_put_net64():align on a 64-bit area" [1] by Nicolas Dichtel <[email protected]>
* Since the
nla_put_net64()API has been changed, therefore, the ip_set_compat.h.in should provides the macroIPSET_NLA_PUT_NET64that point to thenla_put_net64()with appropriate number of arguments.The build script should distinguish the API changes by detect for the existence of
nla_put_64bit()function ininclude/net/netlink.h. This function was added in the same patches set and called by thenla_put_be64()that called bynla_put_net64()respectively.
What are you specifically fixing with this?
The pad attribute just makes sure that, after accessing a 64-bit payload attribute, the follow up attribute still gets aligned to 64-bits.
Quoted 8 lines · Pablo Neira Ayuso
Quoted 7 lines · Neutron Soutmun
* Backports the patch "libnl: nla_put_net64():align on a 64-bit area" [1] by Nicolas Dichtel <[email protected]>
* Since the
nla_put_net64()API has been changed, therefore, the ip_set_compat.h.in should provides the macroIPSET_NLA_PUT_NET64that point to thenla_put_net64()with appropriate number of arguments.
Quoted 6 lines
Quoted 4 lines
The build script should distinguish the API changes by detect for the existence of
nla_put_64bit()function ininclude/net/netlink.h. This function was added in the same patches set and called by thenla_put_be64()that called bynla_put_net64()respectively.What are you specifically fixing with this?
Sorry that the patch is not clear the point.
This patch is on top of the ipset master branch, http://git.netfilter.org/ipset,
which I face a problem to build the latest ipset kernel module against the linux-4.7~rc4-1~exp1 (Debian Experimental).
Therefore, I have backported the patch from mainline and prepared the macro for backward compatible which
the ipset kernel module could be compiled with earlier kernel version (< 4.7)
Best regards,
Neutron Soutmun
Pablo Neira Ayuso
maintainerQuoted 16 lines · Neutron Soutmun
Quoted 8 lines · Pablo Neira Ayuso
Quoted 7 lines · Neutron Soutmun
* Backports the patch "libnl: nla_put_net64():align on a 64-bit area" [1] by Nicolas Dichtel <[email protected]>
* Since the
nla_put_net64()API has been changed, therefore, the ip_set_compat.h.in should provides the macroIPSET_NLA_PUT_NET64that point to thenla_put_net64()with appropriate number of arguments.Quoted 6 lines
Quoted 4 lines
The build script should distinguish the API changes by detect for the existence of
nla_put_64bit()function ininclude/net/netlink.h. This function was added in the same patches set and called by thenla_put_be64()that called bynla_put_net64()respectively.What are you specifically fixing with this?
Quoted 8 lines
Sorry that the patch is not clear the point.
This patch is on top of the ipset master branch, http://git.netfilter.org/ipset,
which I face a problem to build the latest ipset kernel module against the linux-4.7~rc4-1~exp1 (Debian Experimental).Therefore, I have backported the patch from mainline and prepared the macro for backward compatible which
the ipset kernel module could be compiled with earlier kernel version (< 4.7)
What is exactly the compilation error you get?
Userspace should refer to any of those _PAD attributes, so this should be fine.
Quoted 22 lines · Pablo Neira Ayuso
Quoted 21 lines · Neutron Soutmun
Quoted 8 lines · Pablo Neira Ayuso
Quoted 7 lines · Neutron Soutmun
* Backports the patch "libnl: nla_put_net64():align on a 64-bit area" [1] by Nicolas Dichtel <[email protected]>
* Since the
nla_put_net64()API has been changed, therefore, the ip_set_compat.h.in should provides the macroIPSET_NLA_PUT_NET64that point to thenla_put_net64()with appropriate number of arguments.Quoted 6 lines
Quoted 4 lines
The build script should distinguish the API changes by detect for the existence of
nla_put_64bit()function ininclude/net/netlink.h. This function was added in the same patches set and called by thenla_put_be64()that called bynla_put_net64()respectively.What are you specifically fixing with this?
Sorry that the patch is not clear the point.
This patch is on top of the ipset master branch, http://git.netfilter.org/ipset,
which I face a problem to build the latest ipset kernel module against the linux-4.7~rc4-1~exp1 (Debian Experimental).
Quoted 5 lines
Quoted 3 lines
Therefore, I have backported the patch from mainline and prepared the macro for backward compatible which
the ipset kernel module could be compiled with earlier kernel version (< 4.7)What is exactly the compilation error you get?
=== 8< === /usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h:883:59:
note: declared here
static inline int nla_put_net64(struct sk_buff *skb, int attrtype,__be64 value,
^
In file included from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:458:0,
from/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_counter.h:58:9:
error: too few arguments to function ‘nla_put_net64’
nla_put_net64(skb, IPSET_ATTR_PACKETS,
^=== 8< ===
Please see the full attached build.log for more information. As the error mention above, in the /usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h, the nla_put_net64()'s API has been changed, the "int padattr" is added as the fourth argument.
Best regards,
Neutron Soutmun
$ ./configure --with-kmod
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking what extension is used for runtime loadable modules... .so
checking what variable specifies run-time module search path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/lib/x86_64-linux-gnu/libfakeroot /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu checking for library containing dlopen... -ldl
checking for dlerror... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dld_link in -ldld... no
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_add... yes
checking for argz_append... yes
checking for argz_count... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking if argz actually works... yes
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for ltdl.h... yes
checking whether lt_dlinterface_register is declared... yes
checking for lt_dladvise_preload in -lltdl... yes
checking where to find libltdl headers...
checking where to find libltdl library... -lltdl
checking for unistd.h... (cached) yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for mach-o/dyld.h... no
checking for dirent.h... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for strlcat... no
checking for strlcpy... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for gawk... (cached) gawk
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking for libmnl... yes
checking whether NLA_F_NESTED is declared... yes
checking whether NLA_F_NET_BYTEORDER is declared... yes
checking whether NLA_TYPE_MASK is declared... yes
checking for union nf_inet_addr... yes
checking for gethostbyname2... yes
checking kernel source for struct xt_action_param... yes
checking kernel source for vzalloc... yes
checking kernel source for ether_addr_equal... yes
checking kernel source for nla_put_be16... yes
checking kernel source for nla_put_be64... yes
checking kernel source for portid in nl_info... yes
checking kernel source for netlink_dump_start args... 4 args
checking kernel source for ns_capable... yes
checking kernel source for nfnl_lock per subsys... yes
checking kernel source for export.h... yes
checking kernel source for ipv6_skip_exthdr args... 4 args
checking kernel source for bool checkentry function prototype... no
checking kernel source for old struct xt_target_param... no
checking kernel source for id in struct pernet_operations... yes
checking kernel source for user_ns in struct net... yes
checking kernel source for rbtree_postorder_for_each_entry_safe... yes
checking kernel source for kvfree... yes
checking kernel source for struct net in struct xt_mtchk_param... yes
checking kernel source for struct net in the change function of tcf_ematch_ops... yes
checking kernel source for struct net in struct tcf_ematch... yes
checking kernel source for list_last_entry... yes
checking kernel source for list_next_entry... yes
checking kernel source for ether_addr_copy... yes
checking kernel source for nf_bridge_get_physindev... yes
checking kernel source for nla_put_in_addr... yes
checking kernel source for struct net in struct nfnl_callback... yes
checking kernel source for EXPORT_SYMBOL_GPL in module.h... no
checking kernel source for struct net_generic... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/libipset/Makefile
config.status: creating lib/Makefile
config.status: creating lib/libipset.pc
config.status: creating src/Makefile
config.status: creating utils/Makefile
config.status: creating kernel/include/linux/netfilter/ipset/ip_set_compat.h
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
ipset userspace tool configuration:
Dynamic module loading: disabled
Static modules:
ipset_bitmap_ip
ipset_bitmap_ipmac
ipset_bitmap_port
ipset_hash_ip
ipset_hash_ipmac
ipset_hash_ipmark
ipset_hash_ipport
ipset_hash_ipportip
ipset_hash_ipportnet
ipset_hash_mac
ipset_hash_net
ipset_hash_netiface
ipset_hash_netnet
ipset_hash_netport
ipset_hash_netportnet
ipset_list_set
Dynamic modules:
$ make modules
make -C /lib/modules/`uname -r`/build M=$PWD/kernel/net V= \ KCFLAGS="-DPACKAGE_VERSION=6.29" \ IP_SET_MAX=256 KDIR=$PWD/kernel modules
make[1]: Entering directory '/usr/src/linux-headers-4.7.0-rc4-amd64'
CC [M] /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.o
In file included from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:458:0,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_counter.h: In function ‘ip_set_put_counter’:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_counter.h:56:9: error: too few arguments to function ‘nla_put_net64’
return nla_put_net64(skb, IPSET_ATTR_BYTES,
^
In file included from /usr/src/linux-headers-4.7.0-rc4-common/include/net/rtnetlink.h:5:0,
from /usr/src/linux-headers-4.7.0-rc4-common/include/net/sch_generic.h:12,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/filter.h:18,
from /usr/src/linux-headers-4.7.0-rc4-common/include/net/sock.h:64,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/tcp.h:22,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/ipv6.h:76,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:14,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:
/usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h:883:59: note: declared here
static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
^
In file included from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:458:0,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:
/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_counter.h:58:9: error: too few arguments to function ‘nla_put_net64’
nla_put_net64(skb, IPSET_ATTR_PACKETS,
^
In file included from /usr/src/linux-headers-4.7.0-rc4-common/include/net/rtnetlink.h:5:0,
from /usr/src/linux-headers-4.7.0-rc4-common/include/net/sch_generic.h:12,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/filter.h:18,
from /usr/src/linux-headers-4.7.0-rc4-common/include/net/sock.h:64,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/tcp.h:22,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/ipv6.h:76,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:14,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:
/usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h:883:59: note: declared here
static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
^In file included from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:459:0,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_skbinfo.h: In function ‘ip_set_put_skbinfo’:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_skbinfo.h:26:3: error: too few arguments to function ‘nla_put_net64’
nla_put_net64(skb, IPSET_ATTR_SKBMARK,
^
In file included from /usr/src/linux-headers-4.7.0-rc4-common/include/net/rtnetlink.h:5:0,
from /usr/src/linux-headers-4.7.0-rc4-common/include/net/sch_generic.h:12,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/filter.h:18,
from /usr/src/linux-headers-4.7.0-rc4-common/include/net/sock.h:64,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/tcp.h:22,
from /usr/src/linux-headers-4.7.0-rc4-common/include/linux/ipv6.h:76,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:14,
from /home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:
/usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h:883:59: note: declared here
static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
^/usr/src/linux-headers-4.7.0-rc4-common/scripts/Makefile.build:300: recipe for target '/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.o' failed make[5]: *** [/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.o] Error 1 /usr/src/linux-headers-4.7.0-rc4-common/scripts/Makefile.build:445: recipe for target '/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter' failed make[4]: *** [/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter] Error 2 /usr/src/linux-headers-4.7.0-rc4-common/Makefile:1472: recipe for target '_module_/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net' failed make[3]: *** [_module_/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net] Error 2
Makefile:150: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.7.0-rc4-amd64'
Makefile:975: recipe for target 'modules' failed
make: *** [modules] Error 2
Pablo Neira Ayuso
maintainerQuoted 15 lines · Neutron Soutmun
Quoted 1 line · Pablo Neira Ayuso
What is exactly the compilation error you get?
=== 8< ===
/usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h:883:59:
note: declared here
static inline int nla_put_net64(structsk_buff*skb, int attrtype,__be64value,^In file included from
/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:458:0,
from/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_counter.h:58:9:
error: too few arguments to function ‘nla_put_net64’
Quoted 3 lines
nla_put_net64(skb, IPSET_ATTR_PACKETS, ^=== 8< ===
Thanks for explaining, I let Jozsef handle this.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 20 lines · Pablo Neira Ayuso
Quoted 15 lines · Neutron Soutmun
Quoted 1 line · Pablo Neira Ayuso
What is exactly the compilation error you get?
=== 8< ===
/usr/src/linux-headers-4.7.0-rc4-common/include/net/netlink.h:883:59:
note: declared here
static inline int nla_put_net64(structsk_buff*skb, int attrtype,__be64value,^In file included from
/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set.h:458:0,
from/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/net/netfilter/xt_set.c:19:/home/neutron/works/debian/mypkg/ipset/git/ipset/kernel/include/linux/netfilter/ipset/ip_set_counter.h:58:9:
error: too few arguments to function ?nla_put_net64?Quoted 3 lines
nla_put_net64(skb, IPSET_ATTR_PACKETS, ^=== 8< ===
Quoted 1 line
Thanks for explaining, I let Jozsef handle this.
I have already applied the patch in the ipset git tree where it belongs to.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
Quoted 14 lines · Neutron Soutmun
* Backports the patch "libnl: nla_put_net64():align on a 64-bit area" [1] by Nicolas Dichtel <[email protected]>
* Since the
nla_put_net64()API has been changed, therefore, the ip_set_compat.h.in should provides the macroIPSET_NLA_PUT_NET64that point to thenla_put_net64()with appropriate number of arguments.The build script should distinguish the API changes by detect for the existence of
nla_put_64bit()function ininclude/net/netlink.h. This function was added in the same patches set and called by thenla_put_be64()that called bynla_put_net64()respectively.
Quoted 8 lines
Signed-off-by Neutron Soutmun <[email protected]>--- configure.ac | 10 ++++++++++ kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 7 +++++++ kernel/include/linux/netfilter/ipset/ip_set_counter.h | 10 ++++++---- kernel/include/linux/netfilter/ipset/ip_set_skbinfo.h | 7 ++++--- kernel/include/uapi/linux/netfilter/ipset/ip_set.h | 1 + 5 files changed, 28 insertions(+), 7 deletions(-)
Patch is applied, thank you. I couldn't find a simpler backport solution either.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary