diff options
| author | Willem de Bruijn <willemb@google.com> | 2025-02-14 17:27:03 -0500 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-18 18:27:20 -0800 |
| commit | 096208592b09c2f5fc0c1a174694efa41c04209d (patch) | |
| tree | 3e6a7ac4d5426b8dbe927d5fe9adead083863a7d /include/net | |
| parent | e8485911050a60091d1bf51a162f0a2654729fad (diff) | |
ipv6: replace ipcm6_init calls with ipcm6_init_sk
This initializes tclass and dontfrag before cmsg parsing, removing the
need for explicit checks against -1 in each caller.
Leave hlimit set to -1, because its full initialization
(in ip6_sk_dst_hoplimit) requires more state (dst, flowi6, ..).
This also prepares for calling sockcm_init in a follow-on patch.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250214222720.3205500-7-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ipv6.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index f5c43ad1565e..46a679d9b334 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -363,15 +363,6 @@ struct ipcm6_cookie { struct ipv6_txoptions *opt; }; -static inline void ipcm6_init(struct ipcm6_cookie *ipc6) -{ - *ipc6 = (struct ipcm6_cookie) { - .hlimit = -1, - .tclass = -1, - .dontfrag = -1, - }; -} - static inline void ipcm6_init_sk(struct ipcm6_cookie *ipc6, const struct sock *sk) { |
