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>
This commit is contained in:

committed by
David S. Miller

parent
20d4947353
commit
51f31cabe3
@@ -935,6 +935,10 @@ alloc_new_skb:
|
||||
sk->sk_allocation);
|
||||
if (unlikely(skb == NULL))
|
||||
err = -ENOBUFS;
|
||||
else
|
||||
/* only the initial fragment is
|
||||
time stamped */
|
||||
ipc->shtx.flags = 0;
|
||||
}
|
||||
if (skb == NULL)
|
||||
goto error;
|
||||
@@ -945,6 +949,7 @@ alloc_new_skb:
|
||||
skb->ip_summed = csummode;
|
||||
skb->csum = 0;
|
||||
skb_reserve(skb, hh_len);
|
||||
*skb_tx(skb) = ipc->shtx;
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
daddr = ipc.addr = rt->rt_src;
|
||||
ipc.opt = NULL;
|
||||
ipc.shtx.flags = 0;
|
||||
|
||||
if (replyopts.opt.optlen) {
|
||||
ipc.opt = &replyopts.opt;
|
||||
|
Reference in New Issue
Block a user