diff options
author | 2025-02-14 17:27:00 -0500 | |
---|---|---|
committer | 2025-02-18 18:27:19 -0800 | |
commit | 94788792f37902f1f4d417f6f9663831cf7e91fc (patch) | |
tree | d4ed96f5e1a89d6ffc90634b04669aead215f2b6 | |
parent | net: initialize mark in sockcm_init (diff) | |
download | wireguard-linux-94788792f37902f1f4d417f6f9663831cf7e91fc.tar.xz wireguard-linux-94788792f37902f1f4d417f6f9663831cf7e91fc.zip |
ipv4: initialize inet socket cookies with sockcm_init
Avoid open coding the same logic.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250214222720.3205500-4-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | include/net/ip.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 305eccdf4ff7..3c4ef5ddad83 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -94,9 +94,8 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm, { ipcm_init(ipcm); - ipcm->sockc.mark = READ_ONCE(inet->sk.sk_mark); - ipcm->sockc.priority = READ_ONCE(inet->sk.sk_priority); - ipcm->sockc.tsflags = READ_ONCE(inet->sk.sk_tsflags); + sockcm_init(&ipcm->sockc, &inet->sk); + ipcm->oif = READ_ONCE(inet->sk.sk_bound_dev_if); ipcm->addr = inet->inet_saddr; ipcm->protocol = inet->inet_num; |