[NETFILTER]: Move reroute-after-queue code up to the nf_queue layer.
The rerouting functionality is required by the core, therefore it has to be implemented by the core and not in individual queue handlers. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4fdb3bb723
commit
2cc7d57309
@ -198,6 +198,17 @@ extern void nf_invalidate_cache(int pf);
|
||||
Returns true or false. */
|
||||
extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len);
|
||||
|
||||
struct nf_queue_rerouter {
|
||||
void (*save)(const struct sk_buff *skb, struct nf_info *info);
|
||||
int (*reroute)(struct sk_buff **skb, const struct nf_info *info);
|
||||
int rer_size;
|
||||
};
|
||||
|
||||
#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
|
||||
|
||||
extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer);
|
||||
extern int nf_unregister_queue_rerouter(int pf);
|
||||
|
||||
#else /* !CONFIG_NETFILTER */
|
||||
#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb)
|
||||
static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {}
|
||||
|
Reference in New Issue
Block a user