* [PATCH net-next] netfilter: nf_nat_initialized() doesn't modify struct nf_conn, so pointer should be declared const
@ 2022-06-24 16:45 James Yonan
2022-06-25 5:39 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: James Yonan @ 2022-06-24 16:45 UTC (permalink / raw)
To: netdev; +Cc: James Yonan
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>
---
include/net/netfilter/nf_nat.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index 987111ae5240..e9eb01e99d2f 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -104,7 +104,7 @@ unsigned int
nf_nat_inet_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state);
-static inline int nf_nat_initialized(struct nf_conn *ct,
+static inline int nf_nat_initialized(const struct nf_conn *ct,
enum nf_nat_manip_type manip)
{
if (manip == NF_NAT_MANIP_SRC)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] netfilter: nf_nat_initialized() doesn't modify struct nf_conn, so pointer should be declared const
2022-06-24 16:45 [PATCH net-next] netfilter: nf_nat_initialized() doesn't modify struct nf_conn, so pointer should be declared const James Yonan
@ 2022-06-25 5:39 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-06-25 5:39 UTC (permalink / raw)
To: James Yonan; +Cc: netdev
On Fri, 24 Jun 2022 10:45:52 -0600 James Yonan wrote:
> This is helpful for code readability and makes it possible
> to call nf_nat_initialized() with a const struct nf_conn *.
If you want this change to have any chance of getting into mainline you
need to CC maintainers.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-25 5:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-24 16:45 [PATCH net-next] netfilter: nf_nat_initialized() doesn't modify struct nf_conn, so pointer should be declared const James Yonan
2022-06-25 5:39 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).