Re: [PATCH v4 2/3] Do error handling if __build_packet_message fails

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

 



Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> BTW, we should also signal the userspace when we fail to build the
> message via:
> 
> nfnetlink_set_err(net, 0, group, -ENOBUFS);
> 
> so it knows that we're losing log messages for whatever reason.
> Basically, userspace hits -ENOBUFS when calling recv(), which means
> netlink is losing messages. I don't think we really need the
> statistics.

Not sure if this is a good idea.

a) __build_packet_message must never fail.
If it does, the kernel has a size accoutning bug somewhere.
b) I see no meaningful way for userspace to handle this error;
there is nothing it can do about it.
c) If it happens, it might be that some userspace logging daemon
suddently dies because it sees an unexpected 'fatal' error.

> It seems this code needs some care.

Agreed...
--
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