diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 954f3381cc8a..807935693846 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -668,6 +668,21 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | |||
668 | 668 | ||
669 | EXPORT_SYMBOL_GPL(__sock_recv_timestamp); | 669 | EXPORT_SYMBOL_GPL(__sock_recv_timestamp); |
670 | 670 | ||
671 | inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) | ||
672 | { | ||
673 | if (sock_flag(sk, SOCK_RXQ_OVFL) && skb && skb->dropcount) | ||
674 | put_cmsg(msg, SOL_SOCKET, SO_RXQ_OVFL, | ||
675 | sizeof(__u32), &skb->dropcount); | ||
676 | } | ||
677 | |||
678 | void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, | ||
679 | struct sk_buff *skb) | ||
680 | { | ||
681 | sock_recv_timestamp(msg, sk, skb); | ||
682 | sock_recv_drops(msg, sk, skb); | ||
683 | } | ||
684 | EXPORT_SYMBOL_GPL(sock_recv_ts_and_drops); | ||
685 | |||
671 | static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock, | 686 | static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock, |
672 | struct msghdr *msg, size_t size, int flags) | 687 | struct msghdr *msg, size_t size, int flags) |
673 | { | 688 | { |