diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-02-18 04:40:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-20 12:01:08 +0300 |
commit | be0c22a46cfb79ab2342bb28fde99afa94ef868e (patch) | |
tree | da112ef3066d75a7e5adcfe3355ad2b60ef1929b /include/linux/netlink.h | |
parent | 2d96cf8cdfd625da51e5d237d564cd75d3147547 (diff) | |
download | linux-be0c22a46cfb79ab2342bb28fde99afa94ef868e.tar.xz |
netlink: add NETLINK_BROADCAST_ERROR socket option
This patch adds NETLINK_BROADCAST_ERROR which is a netlink
socket option that the listener can set to make netlink_broadcast()
return errors in the delivery to the caller. This option is useful
if the caller of netlink_broadcast() do something with the result
of the message delivery, like in ctnetlink where it drops a network
packet if the event delivery failed, this is used to enable reliable
logging and state-synchronization. If this socket option is not set,
netlink_broadcast() only reports ESRCH errors and silently ignore
ENOBUFS errors, which is what most netlink_broadcast() callers
should do.
This socket option is based on a suggestion from Patrick McHardy.
Patrick McHardy can exchange this patch for a beer from me ;).
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>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 51b09a1f46c3..1e6bf995435c 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -103,6 +103,7 @@ struct nlmsgerr #define NETLINK_ADD_MEMBERSHIP 1 #define NETLINK_DROP_MEMBERSHIP 2 #define NETLINK_PKTINFO 3 +#define NETLINK_BROADCAST_ERROR 4 struct nl_pktinfo { |