History

netfilter: make function op structures const

No functional changes, these structures should be const.

Florian Westphal committed 4 years ago

Commit 285c8a71 parent 3fce1646 files · +18 −18Browse files

Showing the changes to include (1 of 6 files). Show all

Unified · Split

include/linux/netfilter.h+4−4
@@ -381,13 +381,13 @@ struct nf_nat_hook { · 380 unmodified lines
381381 enum ip_conntrack_dir dir);
382382 };
383383
384−extern struct nf_nat_hook __rcu *nf_nat_hook;
384+extern const struct nf_nat_hook __rcu *nf_nat_hook;
385385
386386 static inline void
387387 nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
388388 {
389389 #if IS_ENABLED(CONFIG_NF_NAT)
390− struct nf_nat_hook *nat_hook;
390+ const struct nf_nat_hook *nat_hook;
391391
392392 rcu_read_lock();
393393 nat_hook = rcu_dereference(nf_nat_hook);
@@ -464,7 +464,7 @@ struct nf_ct_hook { · 70 unmodified lines
464464 const struct sk_buff *);
465465 void (*attach)(struct sk_buff *nskb, const struct sk_buff *skb);
466466 };
467−extern struct nf_ct_hook __rcu *nf_ct_hook;
467+extern const struct nf_ct_hook __rcu *nf_ct_hook;
468468
469469 struct nlattr;
470470
@@ -479,7 +479,7 @@ struct nfnl_ct_hook { · 8 unmodified lines
479479 void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct,
480480 enum ip_conntrack_info ctinfo, s32 off);
481481 };
482−extern struct nfnl_ct_hook __rcu *nfnl_ct_hook;
482+extern const struct nfnl_ct_hook __rcu *nfnl_ct_hook;
483483
484484 /**
485485 * nf_skb_duplicated - TEE target has sent a packet

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t