summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nfnetlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-03-23 13:21:06 +0100
committerPatrick McHardy <kaber@trash.net>2009-03-23 13:21:06 +0100
commitdd5b6ce6fd465eab90357711c8e8124dc3a31ff0 (patch)
treeebc40b018356e8cac36ba575e3f183c1a16b782b /net/netfilter/nfnetlink.c
parent176252746ebbc8db97e304345af1f2563c7dc139 (diff)
downloadblackbird-op-linux-dd5b6ce6fd465eab90357711c8e8124dc3a31ff0.tar.gz
blackbird-op-linux-dd5b6ce6fd465eab90357711c8e8124dc3a31ff0.zip
nefilter: nfnetlink: add nfnetlink_set_err and use it in ctnetlink
This patch adds nfnetlink_set_err() to propagate the error to netlink broadcast listener in case of memory allocation errors in the message building. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/nfnetlink.c')
-rw-r--r--net/netfilter/nfnetlink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 9c0ba17a1ddb..2785d66a7e38 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -113,6 +113,12 @@ int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo)
}
EXPORT_SYMBOL_GPL(nfnetlink_send);
+void nfnetlink_set_err(u32 pid, u32 group, int error)
+{
+ netlink_set_err(nfnl, pid, group, error);
+}
+EXPORT_SYMBOL_GPL(nfnetlink_set_err);
+
int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags)
{
return netlink_unicast(nfnl, skb, pid, flags);
OpenPOWER on IntegriCloud