[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49942364.7080607@trash.net>
Date: Thu, 12 Feb 2009 14:25:56 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Pablo Neira Ayuso <pablo@...filter.org>
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 McHardy wrote:
>> Pablo Neira Ayuso wrote:
>>> 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;
>> I always wondered about the intention behind this. It wouldn't
>> hurt to just try the other allocation and see if they also fail.
>
> Indeed. I don't see either the point of stopping other sockets from
> receiving the message because one clone failed, but that's a different
> issue I think.
Indeed.
> BTW, the netlink_set_err() function (I found one call in rtnetlink.c)
> also attracted my attention since it sets the EAGAIN error to all
> listeners when nlmsg_multicast() fails, which happens if the echoing is
> set and unicast fails. This made me think, what would it be the action
> taken by the multicast userspace listener if it hits EAGAIN? Probably,
> let them know that this request may retry? I think there's nothing they
> can do anyway.
They can resync. Not sure where you're getting EAGAIN from, its usually
used to deliver ENOBUFS to sockets when the kernel failed to even
allocate the first skb thats cloned to the sockets. Check out rtmsg_ifa
for an example.
--
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