diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-09-17 13:07:54 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-09-17 13:07:54 +0200 |
commit | fc5c992b7010a733250633d55c4a6ab4932a7125 (patch) | |
tree | 5526a56d9307359243fc51b21af205c59d5f2891 /src/main.c | |
parent | bfa809f6c809f30706a9718506e7a575d44052a6 (diff) | |
download | conntrack-tools-fc5c992b7010a733250633d55c4a6ab4932a7125.tar.gz conntrack-tools-fc5c992b7010a733250633d55c4a6ab4932a7125.zip |
filter: check if kernel-space filtering is available
Check if the Linux kernel is >= 2.6.26, otherwise it does not support
kernel-space filtering. This is not clean but we have no choice, the BSF
infrastructure does not return ENOTSUPP for unsupported operations.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -95,6 +95,10 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } + /* BSF filter attaching does not report unsupported operations */ + if (version >= 2 && major >= 6 && minor >= 26) + CONFIG(kernel_support_netlink_bsf) = 1; + for (i=1; i<argc; i++) { switch(argv[i][1]) { case 'd': |