ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
Subsystems (3)
PATCH 1/1 ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
The function doesn't modify the addresses passed as input, mark them as 'const' to make that clear.
Signed-off-by Beniamino Galvani <[email protected]>
--- include/net/udp_tunnel.h | 5 +++-- net/ipv6/ip6_udp_tunnel.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
include/net/udp_tunnel.h +3 -2
@@ -154,8 +154,9 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skbint udp_tunnel6_xmit_skb (struct dst_entry *dst,struct sock *sk,struct sk_buff *skb, -struct net_device *dev,struct in6_addr *saddr, -struct in6_addr *daddr, +struct net_device *dev, +const struct in6_addr *saddr, +const struct in6_addr *daddr,__u8 prio,__u8 ttl,__be32 label,__be16 src_port,__be16 dst_port,bool nocheck);
net/ipv6/ip6_udp_tunnel.c +3 -2
@@ -75,8 +75,9 @@ EXPORT_SYMBOL_GPL(udp_sock_create6);int udp_tunnel6_xmit_skb (struct dst_entry *dst,struct sock *sk,struct sk_buff *skb, -struct net_device *dev,struct in6_addr *saddr, -struct in6_addr *daddr, +struct net_device *dev, +const struct in6_addr *saddr, +const struct in6_addr *daddr,__u8 prio,__u8 ttl,__be32 label,__be16 src_port,__be16 dst_port,bool nocheck) {
Signature · 1 line
2.40.1
Quoted 2 lines · Beniamino Galvani
The function doesn't modify the addresses passed as input, mark them as 'const' to make that clear.
Reviewed-by Guillaume Nault <[email protected]>
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Sun, 24 Sep 2023 17:30:14 +0200 you wrote:
The function doesn't modify the addresses passed as input, mark them as 'const' to make that clear.
Signed-off-by Beniamino Galvani <[email protected]>--- include/net/udp_tunnel.h | 5 +++-- net/ipv6/ip6_udp_tunnel.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
Here is the summary with links:
- [net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
https://git.kernel.org/netdev/net-next/c/f25e621f5d4c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html