Open socketpair opened 9 years ago
I agree that this was wrong. We should have kept the errno values separate from our internal error codes. And we should not map different errno to the same nlerror.
But the error codes are also part of the API, changing them now can possibly break existing users.
Yes, we should do improve that, but we should try not to change existing behavior. Or at least try to be careful
https://github.com/thom311/libnl/blob/48182486341d1de7892494f272e892c0b18ebef5/lib/error.c#L102 :
This is a bug, as I think. ENOBUFS - is not the same as "Out of memory". Example -- receiving
NFQEUEUE
messages. When queue is overflowed,nl_recvmsgs_default()
returns-5
(i.e.NLE_NOMEM
) due torecvmsg()
returns-1
and set errno toENOBUFS
. Is it indistinguishable from real out of memory situation.Can you add NLE_ENOBUFS or something like that ?