[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1771.1176487470@redhat.com>
Date: Fri, 13 Apr 2007 19:04:30 +0100
From: David Howells <dhowells@...hat.com>
To: netdev@...r.kernel.org
Subject: Can netlink_recvmsg not truncate messages unless asked to?
Would it be feasible to make netlink_recvmsg() _not_ truncate message unless
it is asked to by having MSG_TRUNC passed to it?
Unless netlink data packets are limited to PAGE_SIZE or less, it's entirely
possible that the kernel can be in a situation where it can't guarantee to get
a buffer large enough to receive a packet larger than that.
What I was trying to do was use recvmsg with MSG_PEEK to grab the nlmsghdr,
and then using that to predict the size of the buffer I need. But that
doesn't work because a packet might contain multiple netlink messages.
David
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists