linux/drivers
Pablo Neira Ayuso ff491a7334 netlink: change return-value logic of netlink_broadcast()
Currently, netlink_broadcast() reports errors to the caller if no
messages at all were delivered:

1) If, at least, one message has been delivered correctly, returns 0.
2) Otherwise, if no messages at all were delivered due to skb_clone()
   failure, return -ENOBUFS.
3) Otherwise, if there are no listeners, return -ESRCH.

With this patch, the caller knows if the delivery of any of the
messages to the listeners have failed:

1) If it fails to deliver any message (for whatever reason), return
   -ENOBUFS.
2) Otherwise, if all messages were delivered OK, returns 0.
3) Otherwise, if no listeners, return -ESRCH.

In the current ctnetlink code and in Netfilter in general, we can add
reliable logging and connection tracking event delivery by dropping the
packets whose events were not successfully delivered over Netlink. Of
course, this option would be settable via /proc as this approach reduces
performance (in terms of filtered connections per seconds by a stateful
firewall) but providing reliable logging and event delivery (for
conntrackd) in return.

This patch also changes some clients of netlink_broadcast() that
may report ENOBUFS errors via printk. This error handling is not
of any help. Instead, the userspace daemons that are listening to
those netlink messages should resync themselves with the kernel-side
if they hit ENOBUFS.

BTW, netlink_broadcast() clients include those that call
cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
internally call netlink_broadcast() and return its error value.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 23:56:36 -08:00
..
accessibility
acpi netlink: change return-value logic of netlink_broadcast() 2009-02-05 23:56:36 -08:00
amba
ata Fix my email address in qd65xx.[ch]/pata_qdi.c 2009-02-03 16:53:56 -08:00
atm
auxdisplay
base driver-core: fix kernel-doc parameter name 2009-01-28 15:55:48 -08:00
block
bluetooth
cdrom
char Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-02-04 16:51:58 -08:00
clocksource
connector connector: create connector workqueue only while needed once 2009-02-02 23:22:04 -08:00
cpufreq
cpuidle
crypto
dca dca: redesign locks to fix deadlocks 2009-02-02 23:26:57 -08:00
dio
dma
edac powerpc: More printing warning fixes for the l64 to ll64 conversion 2009-01-28 17:15:52 +11:00
eisa
firewire firewire: sbp2: add workarounds for 2nd and 3rd generation iPods 2009-01-29 20:19:48 +01:00
firmware DMI: Introduce dmi_first_match to make the interface more flexible 2009-01-27 02:15:47 -05:00
gpio gpiolib: fix request related issue 2009-01-29 18:04:43 -08:00
gpu Stop playing silly games with the VM_ACCOUNT flag 2009-01-31 15:08:56 -08:00
hid HID: document difference between hid_blacklist and hid_ignore_list 2009-01-29 11:23:12 +01:00
hwmon hwmon: applesmc: add support for MacPro 3 temperature sensors 2009-01-29 18:04:45 -08:00
i2c
ide Fix my email address in qd65xx.[ch]/pata_qdi.c 2009-02-03 16:53:56 -08:00
idle
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-01-29 18:09:41 -08:00
infiniband iw_cxgb3: handle chip reset notifications 2009-01-26 22:22:19 -08:00
input
isdn
leds
lguest lguest: Fix a memory leak with the lg object during launcher close 2009-01-30 11:34:11 +10:30
macintosh
mca
md
media V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning 2009-02-01 10:41:02 -02:00
memstick
message
mfd
misc sgi-xp: link XPNET's net_device_ops to its net_device structure 2009-02-03 15:16:48 -08:00
mmc pxamci: enable DMA for write ops after CMD/RESP 2009-02-02 20:57:07 +01:00
mtd Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-02-03 16:52:10 -08:00
net e1000e: normalize usage of serdes_has_link 2009-02-05 23:55:45 -08:00
nubus
of
oprofile
parisc Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
parport
pci PCI hotplug: Change link order of pciehp & acpiphp 2009-01-27 15:35:51 -08:00
pcmcia
platform hp-wmi: set initial docking state 2009-01-29 18:04:45 -08:00
pnp
power
ps3
rapidio
regulator leds: Fix bounds checking of wm8350->pmic.led 2009-01-30 21:50:49 +00:00
rtc
s390 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-01-26 17:43:16 -08:00
sbus
scsi netlink: change return-value logic of netlink_broadcast() 2009-02-05 23:56:36 -08:00
serial Add enable_ms to jsm driver 2009-01-30 08:40:54 -08:00
sh
sn
spi
ssb b43/ssb: Add SPROM8 extraction and LP-PHY detection 2009-01-29 15:59:38 -05:00
staging Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
tc
telephony
thermal
uio
usb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream 2009-02-02 17:52:39 +00:00
uwb
video netlink: change return-value logic of netlink_broadcast() 2009-02-05 23:56:36 -08:00
virtio virtio-pci: do not oops on config change if driver not loaded 2009-02-02 19:17:56 -08:00
w1
watchdog
xen xen: make sysfs files behave as their names suggest 2009-01-29 13:20:36 +01:00
zorro
Kconfig
Makefile