netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: David Miller <davem@davemloft.net>
Cc: michellammertink@gmail.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] netlink: fix append of whole original message on negative ack.
Date: Thu, 23 Oct 2008 23:02:32 +0200	[thread overview]
Message-ID: <4900E668.9050101@trash.net> (raw)
In-Reply-To: <20081023.134513.267548182.davem@davemloft.net>

David Miller wrote:
> From: M Lammertink <michellammertink@gmail.com>
> Date: Thu, 23 Oct 2008 20:17:51 +0200
>   
>> 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?
>>
>> Comments appreciated.
>>
>> diff -uprN linux-2.6.27.3.orig/net/netlink/af_netlink.c linux-2.6.27.3/net/netlink/af_netlink.c
>> --- linux-2.6.27.3.orig/net/netlink/af_netlink.c	2008-10-23 18:01:54.000000000 +0200
>> +++ linux-2.6.27.3/net/netlink/af_netlink.c	2008-10-23 18:04:22.000000000 +0200
>> @@ -1656,7 +1656,7 @@ void netlink_ack(struct sk_buff *in_skb,
>>  	}
>>  
>>  	rep = __nlmsg_put(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq,
>> -			  NLMSG_ERROR, sizeof(struct nlmsgerr), 0);
>> +			  NLMSG_ERROR, payload, 0)

You can't include the full message since the resulting message
might exceed the 64k netlink limit.


      parent reply	other threads:[~2008-10-23 21:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4900BFCF.2030707@gmail.com>
2008-10-23 20:45 ` [PATCH] netlink: fix append of whole original message on negative ack David Miller
2008-10-23 20:55   ` Evgeniy Polyakov
2008-10-23 21:02   ` Patrick McHardy [this message]

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=4900E668.9050101@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michellammertink@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).