Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

static unsigned int nf_iterate(struct sk_buff *skb,

struct nf_hook_state *state,


const struct nf_hook_entries *hooks,
unsigned int *index)
{
const struct nf_hook_entry *hook;
unsigned int verdict, i = *index;

while (i < hooks->num_hook_entries) {


hook = &hooks->hooks[i];
repeat:
verdict = nf_hook_entry_hookfn(hook, skb, state);
if (verdict != NF_ACCEPT) {
*index = i;
if (verdict != NF_REPEAT)
return verdict;
goto repeat;
}
i++;
}

*index = i;
return NF_ACCEPT;
}

You might also like