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
381 enum ip_conntrack_dir dir);381 enum ip_conntrack_dir dir);
382};382};
383 383
384extern struct nf_nat_hook __rcu *nf_nat_hook;384extern const struct nf_nat_hook __rcu *nf_nat_hook;
385 385
386static inline void386static inline void
387nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)387nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
388{388{
389#if IS_ENABLED(CONFIG_NF_NAT)389#if IS_ENABLED(CONFIG_NF_NAT)
390 struct nf_nat_hook *nat_hook;390 const struct nf_nat_hook *nat_hook;
391 391
392 rcu_read_lock();392 rcu_read_lock();
393 nat_hook = rcu_dereference(nf_nat_hook);393 nat_hook = rcu_dereference(nf_nat_hook);
@@ -464,7 +464,7 @@ struct nf_ct_hook { · 70 unmodified lines
464 const struct sk_buff *);464 const struct sk_buff *);
465 void (*attach)(struct sk_buff *nskb, const struct sk_buff *skb);465 void (*attach)(struct sk_buff *nskb, const struct sk_buff *skb);
466};466};
467extern struct nf_ct_hook __rcu *nf_ct_hook;467extern const struct nf_ct_hook __rcu *nf_ct_hook;
468 468
469struct nlattr;469struct nlattr;
470 470
@@ -479,7 +479,7 @@ struct nfnl_ct_hook { · 8 unmodified lines
479 void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct,479 void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct,
480 enum ip_conntrack_info ctinfo, s32 off);480 enum ip_conntrack_info ctinfo, s32 off);
481};481};
482extern struct nfnl_ct_hook __rcu *nfnl_ct_hook;482extern const struct nfnl_ct_hook __rcu *nfnl_ct_hook;
483 483
484/**484/**
485 * nf_skb_duplicated - TEE target has sent a packet485 * 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