Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 591bb278 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso
Browse files

netfilter: nf_hook_ops structs can be const



We no longer place these on a list so they can be const.

Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 5da773a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@ struct ipvlan_netns {
	unsigned int ipvl_nf_hook_refcnt;
	unsigned int ipvl_nf_hook_refcnt;
};
};


static struct nf_hook_ops ipvl_nfops[] __read_mostly = {
static const struct nf_hook_ops ipvl_nfops[] = {
	{
	{
		.hook     = ipvlan_nf_input,
		.hook     = ipvlan_nf_input,
		.pf       = NFPROTO_IPV4,
		.pf       = NFPROTO_IPV4,
+1 −1
Original line number Original line Diff line number Diff line
@@ -887,7 +887,7 @@ EXPORT_SYMBOL_GPL(br_netfilter_enable);


/* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
/* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
 * br_dev_queue_push_xmit is called afterwards */
 * br_dev_queue_push_xmit is called afterwards */
static struct nf_hook_ops br_nf_ops[] __read_mostly = {
static const struct nf_hook_ops br_nf_ops[] = {
	{
	{
		.hook = br_nf_pre_routing,
		.hook = br_nf_pre_routing,
		.pf = NFPROTO_BRIDGE,
		.pf = NFPROTO_BRIDGE,
+1 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ ebt_out_hook(void *priv, struct sk_buff *skb,
	return ebt_do_table(skb, state, state->net->xt.frame_filter);
	return ebt_do_table(skb, state, state->net->xt.frame_filter);
}
}


static struct nf_hook_ops ebt_ops_filter[] __read_mostly = {
static const struct nf_hook_ops ebt_ops_filter[] = {
	{
	{
		.hook		= ebt_in_hook,
		.hook		= ebt_in_hook,
		.pf		= NFPROTO_BRIDGE,
		.pf		= NFPROTO_BRIDGE,
+1 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ ebt_nat_out(void *priv, struct sk_buff *skb,
	return ebt_do_table(skb, state, state->net->xt.frame_nat);
	return ebt_do_table(skb, state, state->net->xt.frame_nat);
}
}


static struct nf_hook_ops ebt_ops_nat[] __read_mostly = {
static const struct nf_hook_ops ebt_ops_nat[] = {
	{
	{
		.hook		= ebt_nat_out,
		.hook		= ebt_nat_out,
		.pf		= NFPROTO_BRIDGE,
		.pf		= NFPROTO_BRIDGE,
+1 −1
Original line number Original line Diff line number Diff line
@@ -115,7 +115,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
	RCV_SKB_FAIL(-EINVAL);
	RCV_SKB_FAIL(-EINVAL);
}
}


static struct nf_hook_ops dnrmg_ops __read_mostly = {
static const struct nf_hook_ops dnrmg_ops = {
	.hook		= dnrmg_hook,
	.hook		= dnrmg_hook,
	.pf		= NFPROTO_DECNET,
	.pf		= NFPROTO_DECNET,
	.hooknum	= NF_DN_ROUTE,
	.hooknum	= NF_DN_ROUTE,
Loading