From: Changli Gao <xiaosuo@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: netlink: don't try unicast when dst_pid is zero for NETLINK_USERSOCK
Date: Sat, 14 May 2011 08:50:37 +0800 [thread overview]
Message-ID: <BANLkTimXZ0gU0F0SpmUuUwEsnD3MGSnJcA@mail.gmail.com> (raw)
In-Reply-To: <20110513.164816.691741982303119913.davem@davemloft.net>
On Sat, May 14, 2011 at 4:48 AM, David Miller <davem@davemloft.net> wrote:
> From: Changli Gao <xiaosuo@gmail.com>
> Date: Fri, 13 May 2011 14:24:54 +0800
>
>> For NETLINK_USERSOCK, no one listens on PID 0, so sending a message only to
>> to a multicast group should not return -ECONNREFUSED.
>>
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>
> I don't think this is a great idea, creating different semantics for
> NETLINK_USERSOCK vs. other types.
>
> You have to set the pid to something which will receive the unicast
> message, and then you can also (on top of that) send it to a multicast
> group as well.
>
> But the base operation is always the unicast send, and that is what
> determines success/failure of the operation.
>
Yes, I have seen that the return value of netlink_broadcast() isn't
returned to the caller, so the caller can't know whether the message
broadcasted is sent successfully or not. It isn't a big problem, as
netlink isn't a reliable datagram protocol. Without this patch
applied, we can also send a message to a multicast group only, but
ignore the -ECONNREFUSED error.
Thanks.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
prev parent reply other threads:[~2011-05-14 0:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 6:24 [PATCH] net: netlink: don't try unicast when dst_pid is zero for NETLINK_USERSOCK Changli Gao
2011-05-13 20:48 ` David Miller
2011-05-14 0:50 ` Changli Gao [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=BANLkTimXZ0gU0F0SpmUuUwEsnD3MGSnJcA@mail.gmail.com \
--to=xiaosuo@gmail.com \
--cc=davem@davemloft.net \
--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).