summaryrefslogtreecommitdiffstats
path: root/libiptc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2003-10-07 18:55:13 +0000
committerHarald Welte <laforge@gnumonks.org>2003-10-07 18:55:13 +0000
commit4dc734c73cc4a0ff87c0ce3673544628b58c7e24 (patch)
treed3bc1c09a798cd6bc205ac7dd77e83d9590b3e66 /libiptc
parent7fb4d1f3143eb1235aacc424b29e296948a78034 (diff)
add support for the raw table to userspace
Diffstat (limited to 'libiptc')
-rw-r--r--libiptc/libip4tc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libiptc/libip4tc.c b/libiptc/libip4tc.c
index e012c088..76a8281b 100644
--- a/libiptc/libip4tc.c
+++ b/libiptc/libip4tc.c
@@ -436,6 +436,19 @@ do_check(TC_HANDLE_T h, unsigned int line)
assert(h->info.hook_entry[NF_IP_POST_ROUTING] == n);
user_offset = h->info.hook_entry[NF_IP_POST_ROUTING];
}
+ } else if (strcmp(h->info.name, "raw") == 0) {
+ assert(h->info.valid_hooks
+ == (1 << NF_IP_PRE_ROUTING
+ | 1 << NF_IP_LOCAL_OUT));
+
+ /* Hooks should be first three */
+ assert(h->info.hook_entry[NF_IP_PRE_ROUTING] == 0);
+
+ n = get_chain_end(h, n);
+ n += get_entry(h, n)->next_offset;
+ assert(h->info.hook_entry[NF_IP_LOCAL_OUT] == n);
+
+ user_offset = h->info.hook_entry[NF_IP_LOCAL_OUT];
#ifdef NF_IP_DROPPING
} else if (strcmp(h->info.name, "drop") == 0) {