|
@@ -1951,8 +1951,7 @@ retry:
|
|
|
goto out_unlock;
|
|
|
}
|
|
|
|
|
|
- sockc.transmit_time = 0;
|
|
|
- sockc.tsflags = sk->sk_tsflags;
|
|
|
+ sockcm_init(&sockc, sk);
|
|
|
if (msg->msg_controllen) {
|
|
|
err = sock_cmsg_send(sk, msg, &sockc);
|
|
|
if (unlikely(err))
|
|
@@ -2636,8 +2635,7 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg)
|
|
|
if (unlikely(!(dev->flags & IFF_UP)))
|
|
|
goto out_put;
|
|
|
|
|
|
- sockc.transmit_time = 0;
|
|
|
- sockc.tsflags = po->sk.sk_tsflags;
|
|
|
+ sockcm_init(&sockc, &po->sk);
|
|
|
if (msg->msg_controllen) {
|
|
|
err = sock_cmsg_send(&po->sk, msg, &sockc);
|
|
|
if (unlikely(err))
|
|
@@ -2833,8 +2831,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
|
|
|
if (unlikely(!(dev->flags & IFF_UP)))
|
|
|
goto out_unlock;
|
|
|
|
|
|
- sockc.transmit_time = 0;
|
|
|
- sockc.tsflags = sk->sk_tsflags;
|
|
|
+ sockcm_init(&sockc, sk);
|
|
|
sockc.mark = sk->sk_mark;
|
|
|
if (msg->msg_controllen) {
|
|
|
err = sock_cmsg_send(sk, msg, &sockc);
|