-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ipt_NETFLOW: add compatibility with 6.8+ (include 6.11) #230
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,15 @@ kbuild_test_ref() { | |
void *test = &$1; | ||
EOF | ||
} | ||
|
||
# Test symbol if include exists | ||
kbuild_test_symbol_include() { | ||
echo "Test file exists $KDIR/include/$2" >&2 | ||
if [ -f $KDIR/include/$2 ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing kernel header existence at the file system level is very fragile and does not work for all kernel versions equally well. Also e.g. the Debian linux-headers-* packages have split up the headers into |
||
kbuild_test_symbol $* | ||
fi | ||
} | ||
|
||
# Test that struct is defined. | ||
kbuild_test_struct() { | ||
echo -n "Test struct $* " >&2 | ||
|
@@ -121,14 +130,20 @@ kbuild_test_symbol nf_bridge_info_get linux/netfilter_bridge.h | |
# Stumbled on 5.9 | ||
kbuild_test_struct vlan_dev_priv linux/if_vlan.h | ||
# Kernel version check broken by centos8 | ||
kbuild_test_symbol put_unaligned_be24 asm/unaligned.h | ||
kbuild_test_symbol_include put_unaligned_be24 asm-generic/unaligned.h | ||
kbuild_test_symbol_include put_unaligned_be24 linux/unaligned/generic.h | ||
kbuild_test_symbol_include put_unaligned_be24 linux/unaligned.h | ||
# totalram_pages changed from atomic to inline function. | ||
kbuild_test_symbol totalram_pages linux/mm.h | ||
kbuild_test_ref totalram_pages linux/mm.h | ||
# b86c0e6429da ("netfilter: ecache: prepare for event notifier merge") | ||
kbuild_test_member nf_ct_event_notifier.ct_event net/netfilter/nf_conntrack_ecache.h | ||
# 6.4: 0199849acd07 ("sysctl: remove register_sysctl_paths()") | ||
kbuild_test_symbol register_sysctl_paths linux/sysctl.h | ||
# 6.8: d26270061ae6 ("string: Remove strlcpy()") | ||
kbuild_test_symbol strscpy linux/string.h | ||
# 2.6.18 lacks in6_pton and in4_pton | ||
kbuild_test_symbol in6_pton linux/inet.h | ||
|
||
echo "// End of compat_def.h" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lacks support for < 3.17