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/ip_output.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/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 8ebe86dd72af..3e7e910c7c0f 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -935,6 +935,10 @@ alloc_new_skb: | |||
935 | sk->sk_allocation); | 935 | sk->sk_allocation); |
936 | if (unlikely(skb == NULL)) | 936 | if (unlikely(skb == NULL)) |
937 | err = -ENOBUFS; | 937 | err = -ENOBUFS; |
938 | else | ||
939 | /* only the initial fragment is | ||
940 | time stamped */ | ||
941 | ipc->shtx.flags = 0; | ||
938 | } | 942 | } |
939 | if (skb == NULL) | 943 | if (skb == NULL) |
940 | goto error; | 944 | goto error; |
@@ -945,6 +949,7 @@ alloc_new_skb: | |||
945 | skb->ip_summed = csummode; | 949 | skb->ip_summed = csummode; |
946 | skb->csum = 0; | 950 | skb->csum = 0; |
947 | skb_reserve(skb, hh_len); | 951 | skb_reserve(skb, hh_len); |
952 | *skb_tx(skb) = ipc->shtx; | ||
948 | 953 | ||
949 | /* | 954 | /* |
950 | * Find where to start putting bytes. | 955 | * Find where to start putting bytes. |
@@ -1364,6 +1369,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar | |||
1364 | 1369 | ||
1365 | daddr = ipc.addr = rt->rt_src; | 1370 | daddr = ipc.addr = rt->rt_src; |
1366 | ipc.opt = NULL; | 1371 | ipc.opt = NULL; |
1372 | ipc.shtx.flags = 0; | ||
1367 | 1373 | ||
1368 | if (replyopts.opt.optlen) { | 1374 | if (replyopts.opt.optlen) { |
1369 | ipc.opt = &replyopts.opt; | 1375 | ipc.opt = &replyopts.opt; |