[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <499418F2.8070008@netfilter.org>
Date: Thu, 12 Feb 2009 13:41:22 +0100
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Patrick McHardy <kaber@...sh.net>
CC: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org
Subject: Re: [RFC] netlink broadcast return value
Pablo Neira Ayuso wrote:
> Patrick, I like it, I'm fine with this approach as soon as it let me add
> the "reliable" ctnetlink state-change reporting. I can add the following
> on top of the patch that David already applied:
>
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> [...]
> @@ -999,6 +1000,7 @@ static inline int do_one_broadcast(struct sock *sk,
> p->skb2 = NULL;
> } else if ((val = netlink_broadcast_deliver(sk, p->skb2)) < 0) {
> netlink_overrun(sk);
> + p->delivery_failure = 1;
> ^^^^^^^^^^^^^^^^^^^^^^^^
> Replace this by:
> + if (nlk->flags & NETLINK_HIGHLY_RELIABLE)
> + p->delivery_failure = 1;
>
> And include the flag definition and setsockopt() operations in the new
> patch, of course.
Oh, and also for this:
> if (p->skb2 == NULL) {
> netlink_overrun(sk);
> /* Clone failed. Notify ALL listeners. */
> p->failure = 1;
^^^^^^^^^^^^^^^
if (nlk->flags & NETLINK_HIGHLY_RELIABLE)
p->failure = 1;
--
"Los honestos son inadaptados sociales" -- Les Luthiers
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists