Skip to content

Commit 9478879

Browse files
wdebruijkuba-moo
authored andcommitted
ipv4: 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]>
1 parent 6ad8615 commit 9478879

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

include/net/ip.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm,
9494
{
9595
ipcm_init(ipcm);
9696

97-
ipcm->sockc.mark = READ_ONCE(inet->sk.sk_mark);
98-
ipcm->sockc.priority = READ_ONCE(inet->sk.sk_priority);
99-
ipcm->sockc.tsflags = READ_ONCE(inet->sk.sk_tsflags);
97+
sockcm_init(&ipcm->sockc, &inet->sk);
98+
10099
ipcm->oif = READ_ONCE(inet->sk.sk_bound_dev_if);
101100
ipcm->addr = inet->inet_saddr;
102101
ipcm->protocol = inet->inet_num;

0 commit comments

Comments
 (0)