|
@@ -539,6 +539,7 @@ static inline int check_entry_size_and_hooks(struct arpt_entry *e,
|
|
|
unsigned char *limit,
|
|
|
const unsigned int *hook_entries,
|
|
|
const unsigned int *underflows,
|
|
|
+ unsigned int valid_hooks,
|
|
|
unsigned int *i)
|
|
|
{
|
|
|
unsigned int h;
|
|
@@ -558,6 +559,8 @@ static inline int check_entry_size_and_hooks(struct arpt_entry *e,
|
|
|
|
|
|
/* Check hooks & underflows */
|
|
|
for (h = 0; h < NF_ARP_NUMHOOKS; h++) {
|
|
|
+ if (!(valid_hooks & (1 << h)))
|
|
|
+ continue;
|
|
|
if ((unsigned char *)e - base == hook_entries[h])
|
|
|
newinfo->hook_entry[h] = hook_entries[h];
|
|
|
if ((unsigned char *)e - base == underflows[h])
|
|
@@ -626,7 +629,7 @@ static int translate_table(const char *name,
|
|
|
newinfo,
|
|
|
entry0,
|
|
|
entry0 + size,
|
|
|
- hook_entries, underflows, &i);
|
|
|
+ hook_entries, underflows, valid_hooks, &i);
|
|
|
duprintf("translate_table: ARPT_ENTRY_ITERATE gives %d\n", ret);
|
|
|
if (ret != 0)
|
|
|
return ret;
|