diff options
| author | Willem de Bruijn <[email protected]> | 2025-02-14 22:27:04 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-19 02:27:20 +0000 |
| commit | 5cd2f78886dd86de1b13d6502808a149f1b77959 (patch) | |
| tree | 18e96c886429439348040708d78eb642c75707d5 /net/ipv6/raw.c | |
| parent | ipv6: replace ipcm6_init calls with ipcm6_init_sk (diff) | |
| download | kernel-5cd2f78886dd86de1b13d6502808a149f1b77959.tar.gz kernel-5cd2f78886dd86de1b13d6502808a149f1b77959.zip | |
ipv6: initialize inet socket cookies with sockcm_init
Avoid open coding the same logic.
Signed-off-by: Willem de Bruijn <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv6/raw.c')
| -rw-r--r-- | net/ipv6/raw.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ae68d3f7dd32..fda640ebd53f 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -769,19 +769,16 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) hdrincl = inet_test_bit(HDRINCL, sk); + ipcm6_init_sk(&ipc6, sk); + /* * Get and verify the address. */ memset(&fl6, 0, sizeof(fl6)); - fl6.flowi6_mark = READ_ONCE(sk->sk_mark); + fl6.flowi6_mark = ipc6.sockc.mark; fl6.flowi6_uid = sk->sk_uid; - ipcm6_init_sk(&ipc6, sk); - ipc6.sockc.tsflags = READ_ONCE(sk->sk_tsflags); - ipc6.sockc.mark = fl6.flowi6_mark; - ipc6.sockc.priority = READ_ONCE(sk->sk_priority); - if (sin6) { if (addr_len < SIN6_LEN_RFC2133) return -EINVAL; |
