diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2009-02-12 00:03:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-16 01:43:38 -0500 |
commit | 51f31cabe3ce5345b51e4a4f82138b38c4d5dc91 (patch) | |
tree | f59504adbbe37e6e28ac78e6a49f045508daa78e /net/ipv4/udp.c | |
parent | 20d4947353be60e909e6b1a79d241457edd6833f (diff) |
ip: support for TX timestamps on UDP and RAW sockets
Instructions for time stamping outgoing packets are take from the
socket layer and later copied into the new skb.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index c47c989cb1fb..4bd178a111d5 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -596,6 +596,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
596 | return -EOPNOTSUPP; | 596 | return -EOPNOTSUPP; |
597 | 597 | ||
598 | ipc.opt = NULL; | 598 | ipc.opt = NULL; |
599 | ipc.shtx.flags = 0; | ||
599 | 600 | ||
600 | if (up->pending) { | 601 | if (up->pending) { |
601 | /* | 602 | /* |
@@ -643,6 +644,9 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
643 | ipc.addr = inet->saddr; | 644 | ipc.addr = inet->saddr; |
644 | 645 | ||
645 | ipc.oif = sk->sk_bound_dev_if; | 646 | ipc.oif = sk->sk_bound_dev_if; |
647 | err = sock_tx_timestamp(msg, sk, &ipc.shtx); | ||
648 | if (err) | ||
649 | return err; | ||
646 | if (msg->msg_controllen) { | 650 | if (msg->msg_controllen) { |
647 | err = ip_cmsg_send(sock_net(sk), msg, &ipc); | 651 | err = ip_cmsg_send(sock_net(sk), msg, &ipc); |
648 | if (err) | 652 | if (err) |