diff options
| author | Gal Pressman <gal@nvidia.com> | 2025-02-19 17:32:55 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-21 00:17:16 +0300 |
| commit | ba3fa6e8c1eb4e40719451710263c87fb5f22221 (patch) | |
| tree | 1b0d90a1c7a2b3c2a707aa71868ff1c85c20509b /include | |
| parent | 5d6ba5ab8582aa35c1ee98e47af28e6f6772596c (diff) | |
| download | linux-ba3fa6e8c1eb4e40719451710263c87fb5f22221.tar.xz | |
ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1'
Tunnel options should not be accessed directly, use the ip_tunnel_info()
accessor instead.
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/20250219143256.370277-2-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip_tunnels.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 1aa31bdb2b31..7b54cea5de27 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -650,7 +650,7 @@ static inline void iptunnel_xmit_stats(struct net_device *dev, int pkt_len) static inline void ip_tunnel_info_opts_get(void *to, const struct ip_tunnel_info *info) { - memcpy(to, info + 1, info->options_len); + memcpy(to, ip_tunnel_info_opts(info), info->options_len); } static inline void ip_tunnel_info_opts_set(struct ip_tunnel_info *info, |
