Loading include/linux/netfilter.h +4 −4 Original line number Original line Diff line number Diff line Loading @@ -282,10 +282,10 @@ struct nf_queue_handler { char *name; char *name; }; }; extern int nf_register_queue_handler(int pf, extern int nf_register_queue_handler(int pf, struct nf_queue_handler *qh); const struct nf_queue_handler *qh); extern int nf_unregister_queue_handler(int pf, extern int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh); const struct nf_queue_handler *qh); extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh); extern void nf_reinject(struct sk_buff *skb, extern void nf_reinject(struct sk_buff *skb, struct nf_info *info, struct nf_info *info, unsigned int verdict); unsigned int verdict); Loading net/ipv4/netfilter/ip_queue.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -645,7 +645,7 @@ static const struct file_operations ip_queue_proc_fops = { .owner = THIS_MODULE, .owner = THIS_MODULE, }; }; static struct nf_queue_handler nfqh = { static const struct nf_queue_handler nfqh = { .name = "ip_queue", .name = "ip_queue", .outfn = &ipq_enqueue_packet, .outfn = &ipq_enqueue_packet, }; }; Loading net/ipv6/netfilter/ip6_queue.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -634,7 +634,7 @@ static const struct file_operations ip6_queue_proc_fops = { .owner = THIS_MODULE, .owner = THIS_MODULE, }; }; static struct nf_queue_handler nfqh = { static const struct nf_queue_handler nfqh = { .name = "ip6_queue", .name = "ip6_queue", .outfn = &ipq_enqueue_packet, .outfn = &ipq_enqueue_packet, }; }; Loading net/netfilter/nf_queue.c +6 −6 Original line number Original line Diff line number Diff line Loading @@ -15,13 +15,13 @@ * long term mutex. The handler must provide an an outfn() to accept packets * long term mutex. The handler must provide an an outfn() to accept packets * for queueing and must reinject all packets it receives, no matter what. * for queueing and must reinject all packets it receives, no matter what. */ */ static struct nf_queue_handler *queue_handler[NPROTO]; static const struct nf_queue_handler *queue_handler[NPROTO]; static DEFINE_MUTEX(queue_handler_mutex); static DEFINE_MUTEX(queue_handler_mutex); /* return EBUSY when somebody else is registered, return EEXIST if the /* return EBUSY when somebody else is registered, return EEXIST if the * same handler is registered, return 0 in case of success. */ * same handler is registered, return 0 in case of success. */ int nf_register_queue_handler(int pf, struct nf_queue_handler *qh) int nf_register_queue_handler(int pf, const struct nf_queue_handler *qh) { { int ret; int ret; Loading @@ -44,7 +44,7 @@ int nf_register_queue_handler(int pf, struct nf_queue_handler *qh) EXPORT_SYMBOL(nf_register_queue_handler); EXPORT_SYMBOL(nf_register_queue_handler); /* The caller must flush their queue before this */ /* The caller must flush their queue before this */ int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh) int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh) { { if (pf >= NPROTO) if (pf >= NPROTO) return -EINVAL; return -EINVAL; Loading @@ -64,7 +64,7 @@ int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh) } } EXPORT_SYMBOL(nf_unregister_queue_handler); EXPORT_SYMBOL(nf_unregister_queue_handler); void nf_unregister_queue_handlers(struct nf_queue_handler *qh) void nf_unregister_queue_handlers(const struct nf_queue_handler *qh) { { int pf; int pf; Loading Loading @@ -98,7 +98,7 @@ static int __nf_queue(struct sk_buff *skb, struct net_device *physoutdev = NULL; struct net_device *physoutdev = NULL; #endif #endif struct nf_afinfo *afinfo; struct nf_afinfo *afinfo; struct nf_queue_handler *qh; const struct nf_queue_handler *qh; /* QUEUE == DROP if noone is waiting, to be safe. */ /* QUEUE == DROP if noone is waiting, to be safe. */ rcu_read_lock(); rcu_read_lock(); Loading Loading @@ -313,7 +313,7 @@ static int seq_show(struct seq_file *s, void *v) { { int ret; int ret; loff_t *pos = v; loff_t *pos = v; struct nf_queue_handler *qh; const struct nf_queue_handler *qh; rcu_read_lock(); rcu_read_lock(); qh = rcu_dereference(queue_handler[*pos]); qh = rcu_dereference(queue_handler[*pos]); Loading net/netfilter/nfnetlink_queue.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -849,7 +849,7 @@ static const struct nla_policy nfqa_cfg_policy[NFQA_CFG_MAX+1] = { [NFQA_CFG_PARAMS] = { .len = sizeof(struct nfqnl_msg_config_params) }, [NFQA_CFG_PARAMS] = { .len = sizeof(struct nfqnl_msg_config_params) }, }; }; static struct nf_queue_handler nfqh = { static const struct nf_queue_handler nfqh = { .name = "nf_queue", .name = "nf_queue", .outfn = &nfqnl_enqueue_packet, .outfn = &nfqnl_enqueue_packet, }; }; Loading Loading
include/linux/netfilter.h +4 −4 Original line number Original line Diff line number Diff line Loading @@ -282,10 +282,10 @@ struct nf_queue_handler { char *name; char *name; }; }; extern int nf_register_queue_handler(int pf, extern int nf_register_queue_handler(int pf, struct nf_queue_handler *qh); const struct nf_queue_handler *qh); extern int nf_unregister_queue_handler(int pf, extern int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh); const struct nf_queue_handler *qh); extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh); extern void nf_reinject(struct sk_buff *skb, extern void nf_reinject(struct sk_buff *skb, struct nf_info *info, struct nf_info *info, unsigned int verdict); unsigned int verdict); Loading
net/ipv4/netfilter/ip_queue.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -645,7 +645,7 @@ static const struct file_operations ip_queue_proc_fops = { .owner = THIS_MODULE, .owner = THIS_MODULE, }; }; static struct nf_queue_handler nfqh = { static const struct nf_queue_handler nfqh = { .name = "ip_queue", .name = "ip_queue", .outfn = &ipq_enqueue_packet, .outfn = &ipq_enqueue_packet, }; }; Loading
net/ipv6/netfilter/ip6_queue.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -634,7 +634,7 @@ static const struct file_operations ip6_queue_proc_fops = { .owner = THIS_MODULE, .owner = THIS_MODULE, }; }; static struct nf_queue_handler nfqh = { static const struct nf_queue_handler nfqh = { .name = "ip6_queue", .name = "ip6_queue", .outfn = &ipq_enqueue_packet, .outfn = &ipq_enqueue_packet, }; }; Loading
net/netfilter/nf_queue.c +6 −6 Original line number Original line Diff line number Diff line Loading @@ -15,13 +15,13 @@ * long term mutex. The handler must provide an an outfn() to accept packets * long term mutex. The handler must provide an an outfn() to accept packets * for queueing and must reinject all packets it receives, no matter what. * for queueing and must reinject all packets it receives, no matter what. */ */ static struct nf_queue_handler *queue_handler[NPROTO]; static const struct nf_queue_handler *queue_handler[NPROTO]; static DEFINE_MUTEX(queue_handler_mutex); static DEFINE_MUTEX(queue_handler_mutex); /* return EBUSY when somebody else is registered, return EEXIST if the /* return EBUSY when somebody else is registered, return EEXIST if the * same handler is registered, return 0 in case of success. */ * same handler is registered, return 0 in case of success. */ int nf_register_queue_handler(int pf, struct nf_queue_handler *qh) int nf_register_queue_handler(int pf, const struct nf_queue_handler *qh) { { int ret; int ret; Loading @@ -44,7 +44,7 @@ int nf_register_queue_handler(int pf, struct nf_queue_handler *qh) EXPORT_SYMBOL(nf_register_queue_handler); EXPORT_SYMBOL(nf_register_queue_handler); /* The caller must flush their queue before this */ /* The caller must flush their queue before this */ int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh) int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh) { { if (pf >= NPROTO) if (pf >= NPROTO) return -EINVAL; return -EINVAL; Loading @@ -64,7 +64,7 @@ int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh) } } EXPORT_SYMBOL(nf_unregister_queue_handler); EXPORT_SYMBOL(nf_unregister_queue_handler); void nf_unregister_queue_handlers(struct nf_queue_handler *qh) void nf_unregister_queue_handlers(const struct nf_queue_handler *qh) { { int pf; int pf; Loading Loading @@ -98,7 +98,7 @@ static int __nf_queue(struct sk_buff *skb, struct net_device *physoutdev = NULL; struct net_device *physoutdev = NULL; #endif #endif struct nf_afinfo *afinfo; struct nf_afinfo *afinfo; struct nf_queue_handler *qh; const struct nf_queue_handler *qh; /* QUEUE == DROP if noone is waiting, to be safe. */ /* QUEUE == DROP if noone is waiting, to be safe. */ rcu_read_lock(); rcu_read_lock(); Loading Loading @@ -313,7 +313,7 @@ static int seq_show(struct seq_file *s, void *v) { { int ret; int ret; loff_t *pos = v; loff_t *pos = v; struct nf_queue_handler *qh; const struct nf_queue_handler *qh; rcu_read_lock(); rcu_read_lock(); qh = rcu_dereference(queue_handler[*pos]); qh = rcu_dereference(queue_handler[*pos]); Loading
net/netfilter/nfnetlink_queue.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -849,7 +849,7 @@ static const struct nla_policy nfqa_cfg_policy[NFQA_CFG_MAX+1] = { [NFQA_CFG_PARAMS] = { .len = sizeof(struct nfqnl_msg_config_params) }, [NFQA_CFG_PARAMS] = { .len = sizeof(struct nfqnl_msg_config_params) }, }; }; static struct nf_queue_handler nfqh = { static const struct nf_queue_handler nfqh = { .name = "nf_queue", .name = "nf_queue", .outfn = &nfqnl_enqueue_packet, .outfn = &nfqnl_enqueue_packet, }; }; Loading