bugzilla-daemon at netfilter.org
2017-Mar-28 19:27 UTC
[Bug 1139] New: The include guards on the include/libipset/linux_ip_set*.h are wrong
https://bugzilla.netfilter.org/show_bug.cgi?id=1139 Bug ID: 1139 Summary: The include guards on the include/libipset/linux_ip_set*.h are wrong Product: ipset Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P5 Component: default Assignee: netfilter-buglog at lists.netfilter.org Reporter: quentin at armitage.org.uk The header files include/libipset/linux_ip_set*.h are copies of the kernel headers, which are be installed if kernel headers are installed. Since the two sets of headers define the same things, it is necessary that the include guards are the same so that including one stops the definitions etc from the other being included. In some cases it is not possible to exclusively use either one set of header files or the other, since it can be necessary, for example, to include both libipset/session.h and linux/netfilter/xt_set.h and the former includes libipset/linux_ip_set.h and the latter includes linux/netfilter/ipset/ip_set.h. Although in the kernel source code the headers include '_UAPI' as part of the include guard define, it is removed as part of the processing by scripts/headers_install.sh in the kernel source, which at aroundabout line 39 has the following: -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \ which removes the _UAPI string prefix from the guard. In order to resolve this, in the ipset top level Makefile.am, in update_includes section, it needs to be changed from: update_includes: for x in ip_set.h ip_set_bitmap.h ip_set_hash.h ip_set_list.h; do \ cp kernel/include/uapi/linux/netfilter/ipset/$$x \ include/libipset/linux_$$x; \ done to update_includes: for x in ip_set.h ip_set_bitmap.h ip_set_hash.h ip_set_list.h; do \ sed -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \ kernel/include/uapi/linux/netfilter/ipset/$$x \ >include/libipset/linux_$$x; \ done It is possible that the whole sed command from scripts/headers_install.sh should be replicated in the ipset Makefile.am, viz: sed -r \ -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \ -e 's/__attribute_const__([ \t]|$)/\1/g' \ -e 's@^#include <linux/compiler.h>@@' \ -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ -e 's/(^|[ \t(])(inline|asm|volatile)([ \t(]|$)/\1__\2__\3/g' \ -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \ but I think none of the other substitutions actually apply. -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170328/197dd193/attachment.html>
bugzilla-daemon at netfilter.org
2017-Mar-30 19:04 UTC
[Bug 1139] The include guards on the include/libipset/linux_ip_set*.h are wrong
https://bugzilla.netfilter.org/show_bug.cgi?id=1139 Jozsef Kadlecsik <kadlec at netfilter.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kadlec at netfilter.org --- Comment #1 from Jozsef Kadlecsik <kadlec at netfilter.org> --- The sed command fails at my system: $ sed -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' kernel/include/uapi/linux/netfilter/ipset/ip_set_bitmap.h sed: -e expression #1, char 51: invalid reference \1 on `s' command's RHS What do I miss? -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170330/45ca8d3e/attachment.html>
bugzilla-daemon at netfilter.org
2017-Mar-31 09:25 UTC
[Bug 1139] The include guards on the include/libipset/linux_ip_set*.h are wrong
https://bugzilla.netfilter.org/show_bug.cgi?id=1139 --- Comment #2 from Quentin Armitage <quentin at armitage.org.uk> --- My apologies, sed also needs the -r option, and with that the sed command works for me. -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170331/76835972/attachment.html>
bugzilla-daemon at netfilter.org
2017-Mar-31 09:26 UTC
[Bug 1139] The include guards on the include/libipset/linux_ip_set*.h are wrong
https://bugzilla.netfilter.org/show_bug.cgi?id=1139 --- Comment #3 from Quentin Armitage <quentin at armitage.org.uk> --- My apologies, sed also needs the -r option, and with that the sed command works for me. -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170331/f6fc8e44/attachment.html>
bugzilla-daemon at netfilter.org
2017-Sep-14 17:53 UTC
[Bug 1139] The include guards on the include/libipset/linux_ip_set*.h are wrong
https://bugzilla.netfilter.org/show_bug.cgi?id=1139 Jozsef Kadlecsik <kadlec at netfilter.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Jozsef Kadlecsik <kadlec at netfilter.org> --- One more line was needed in the sed command. The fix is in the git tree, thank you! -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170914/32b0f70b/attachment.html>
Seemingly Similar Threads
- [Bug 891] New: Build failure on Slackware AMD 64bit with GLIBC 2.7
- [Bug 838] New: ipset add foo syslog fails for bitmap:port
- [Bug 842] New: Addition of iptables rule referencing an ipset of the wrong address family does not fail
- [Bug 840] New: Specifying CIDR when adding to a hash:ip entry is silently ignored
- [Bug 859] New: bitmap:port appears to be using 8 bytes of kernel memory per port, rather than 1 bit.