Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nf_nat: in nf_nat_initialized(), use const struct nf_conn *

nf_nat_initialized() doesn't modify passed struct nf_conn,
so declare as const.

This is helpful for code readability and makes it possible
to call nf_nat_initialized() with a const struct nf_conn *.

Signed-off-by: James Yonan <james@openvpn.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

James Yonan and committed by
Pablo Neira Ayuso
9d2f00fb 6b772053

+1 -1
+1 -1
include/net/netfilter/nf_nat.h
··· 104 104 nf_nat_inet_fn(void *priv, struct sk_buff *skb, 105 105 const struct nf_hook_state *state); 106 106 107 - static inline int nf_nat_initialized(struct nf_conn *ct, 107 + static inline int nf_nat_initialized(const struct nf_conn *ct, 108 108 enum nf_nat_manip_type manip) 109 109 { 110 110 if (manip == NF_NAT_MANIP_SRC)