linux/net/decnet
Pablo Neira Ayuso 1ce85fe402 netlink: change nlmsg_notify() return value logic
This patch changes the return value of nlmsg_notify() as follows:

If NETLINK_BROADCAST_ERROR is set by any of the listeners and
an error in the delivery happened, return the broadcast error;
else if there are no listeners apart from the socket that
requested a change with the echo flag, return the result of the
unicast notification. Thus, with this patch, the unicast
notification is handled in the same way of a broadcast listener
that has set the NETLINK_BROADCAST_ERROR socket flag.

This patch is useful in case that the caller of nlmsg_notify()
wants to know the result of the delivery of a netlink notification
(including the broadcast delivery) and take any action in case
that the delivery failed. For example, ctnetlink can drop packets
if the event delivery failed to provide reliable logging and
state-synchronization at the cost of dropping packets.

This patch also modifies the rtnetlink code to ignore the return
value of rtnl_notify() in all callers. The function rtnl_notify()
(before this patch) returned the error of the unicast notification
which makes rtnl_set_sk_err() reports errors to all listeners. This
is not of any help since the origin of the change (the socket that
requested the echoing) notices the ENOBUFS error if the notification
fails and should resync itself.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-24 23:18:28 -08:00
..
netfilter [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
Kconfig [NET]: Rethink mark field in struct flowi 2006-12-02 21:21:39 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
README Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
TODO Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
af_decnet.c net: replace uses of __constant_{endian} 2009-02-01 00:45:17 -08:00
dn_dev.c netlink: change nlmsg_notify() return value logic 2009-02-24 23:18:28 -08:00
dn_fib.c [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
dn_neigh.c decnet: remove private wrappers of endian helpers 2008-11-27 00:12:47 -08:00
dn_nsp_in.c decnet: remove private wrappers of endian helpers 2008-11-27 00:12:47 -08:00
dn_nsp_out.c decnet: remove private wrappers of endian helpers 2008-11-27 00:12:47 -08:00
dn_route.c net: replace uses of __constant_{endian} 2009-02-01 00:45:17 -08:00
dn_rules.c net: add fib_rules_ops to flush_cache method 2008-07-05 19:01:28 -07:00
dn_table.c netlink: change nlmsg_notify() return value logic 2009-02-24 23:18:28 -08:00
dn_timer.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sysctl_net_decnet.c decnet: remove private wrappers of endian helpers 2008-11-27 00:12:47 -08:00

README

                       Linux DECnet Project
                      ======================

The documentation for this kernel subsystem is available in the
Documentation/networking subdirectory of this distribution and also
on line at http://www.chygwyn.com/DECnet/

Steve Whitehouse <SteveW@ACM.org>