Re: [RFC] netlink broadcast return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux