From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Subject: Can netlink_recvmsg not truncate messages unless asked to?
Date: Fri, 13 Apr 2007 19:04:30 +0100 [thread overview]
Message-ID: <1771.1176487470@redhat.com> (raw)
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
reply other threads:[~2007-04-13 18:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1771.1176487470@redhat.com \
--to=dhowells@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.