Commit:     b558ff799977a4eda8b3823d1cf6c1c33becb671
Parent:     b7aa0bf70c4afb9e38be25f5c0922498d0f8684c
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 6 17:02:35 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:23:35 2007 -0700

    [NETLINK]: Mirror UDP MSG_TRUNC semantics.
    If the user passes MSG_TRUNC in via msg_flags, return
    the full packet size not the truncated size.
    Idea from Herbert Xu and Thomas Graf.
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/netlink/af_netlink.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c48b0f4..5890210 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1242,6 +1242,9 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct 
socket *sock,
        scm_recv(sock, msg, siocb->scm, flags);
+       if (flags & MSG_TRUNC)
+               copied = skb->len;
        return err ? : copied;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to