lkml.org 
[lkml]   [2008]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] netlink: fix append of whole original message on negative ack.
Hi.

On Thu, Oct 23, 2008 at 01:45:13PM -0700, David Miller (davem@davemloft.net) wrote:
> > Netlink can return an negative acknowledgement, which AFAICT should include an error code and the whole original message. This patch fixes the size argument given to the __nlmsg_put call. Without this patch only the original header was attached.
> > ---
> >
> > Can anyone explain to me why struct nlmsgerr contains an int error and the nlmsghdr struct. The comment in netlink_ack states that the whole message should be appended. Why not only include an int error in struct nlmsgerr and just append the original message?

Having header (even seq/pid only) is enough to find a message
for that userspace which cares. Looks like your patch can break
existing applications which are used to work with header only,
even if that was a mistake? Although application is supposed to
check the length, it still can expect only a header. I have to
note, that I do not know any such application though.

--
Evgeniy Polyakov


\
 
 \ /
  Last update: 2008-10-23 22:59    [W:2.079 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site