in-tree include files issues
Quoted 10 lines · Pablo Neira
Hi Harald,
Quoted 4 lines · [email protected] wrote:
Added:
trunk/libnetfilter_log/include/libnetfilter_log/linux_nfnetlink_log.h
===================================================================libnetfilter_log/include/libnetfilter_log/linux_nfnetlink_log.h +0
-0[...]
Quoted 9 lines
libnetfilter_queue/include/libnetfilter_queue/linux_nfnetlink_queue.h
Quoted 4 lines
Added:
trunk/libnetfilter_queue/include/libnetfilter_queue/linux_nfnetlink_queue.h
===================================================================libnetfilter_queue/include/libnetfilter_queue/linux_nfnetlink_queue.h +0
-0I don't like this too much. This implies that we'll have to worry about propagating the changes that we make in kernel space to the libraries. I propose you something different: The idea is copying the include files required at
autogen.shstage. See the patch attached.
yes, this is what we've originally discussed but I haven't yet received such a patch. Also, plain copying is not enough, since we need to mangle the include paths, etc. (at least for the other libraries, not for libnfnetlink alone).
I used to have issues with this 'copying' approach, too. But from all teh experience we've got with iptables now, I think it's better than anything else ;)
We're not allowed to do modifications to existing definitions in those header files anyway... only additions.
Quoted 3 lines
BTW, libnfnetlink is currently broken, it doesn't seem to compile. I guess that the release 0.11 is affected as well, so we'll have to do another release :(.
mh. seems like I have too current kernel headers installed.
But you can't unconditionally define, it, but rather have to place it into a #ifndef / #endif clause.
Quoted 15 lines
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
(quoted diff) +0
-7-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libnfnetlink\" -DVERSION=\"0.0.12\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -I../include -I -fPIC -Wall -g -O2 -MT libnfnetlink.lo -MD -MP -MF .deps/libnfnetlink.Tpo -c libnfnetlink.c -fPIC -DPIC -o
.libs/libnfnetlink.olibnfnetlink.c: In function `nfnl_open':
libnfnetlink.c:89: error: `NETLINK_NETFILTER' undeclared (first use in this function)
libnfnetlink.c:89: error: (Each undeclared identifier is reported only once libnfnetlink.c:89: error: for each function it appears in.)
Quoted 2 lines
NETLINK_NETFILTERis defined innetlink.h, but since revision 4500 that you introduced we don't need a kernel tree anymore.
well, we still need include/linux/netlink.h, which is supposed to contain that definition (but which doesn't on old systems) :(
Quoted 7 lines
In short, the patch attached does the following things:
- AddNETLINK_NETFILTERmissing definition
- Remove KERNELDIR from Makefile.am, it's not defined anymore.
- Copy include files atautogen.shIf you decide to apply this patch, please remove
linux_libnfnetlink.hfrom the SVN tree as well.
Somehow I like to have it in SVN, this way we have all the files from a particular release in svn.
If we don't commit the file to svn, then you can't just do a simple 'diff' to notice the changes between two libnfnetlink releases, since the differences in linux_nfnetlink.h will be missing.
We could keep it in svn, and still use your copying patch. This way the changes would be committed at the next 'commit'.
Signature · 5 lines
- Harald Welte <[email protected]> http://netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie