All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Maik Hentsche <netfilter@mm-double.de>
Cc: netfilter-devel@lists.netfilter.org,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [PATCH] libnfnetlink
Date: Fri, 29 Sep 2006 16:18:35 +0200	[thread overview]
Message-ID: <451D2B3B.7070604@trash.net> (raw)
In-Reply-To: <1159531818.451d0d2a31b47@www.domainfactory-webmail.de>

Maik Hentsche wrote:
> Hello Pablo, hello readers of the list,
> I found another bug in libnfnetlink. The comment of nfnl_recv states, in
> case of success 0 is returned. In fact at success the returnvalue of
> recvfrom is returned, which is the number of received bytes
> (libnfnetlink_recv_comment.patch). The second issue is a little more
> serious. The comment states, in case of an error, errno is set when in
> fact it is not. I appended a patch for two occurences, but I since I
> don't know, in which case addrlen might be != sizeof(peer) and what
> peer.nl_pid means (and therefore why it is a problem, if it's not 0)
> two error cases without appropriate errno value still exist.

addrlen != sizeof(peer) should never happen. I can't think of anything
better than EINVAL. nl_pid != 0 means the message originated in
userspace and some other program is trying to feed us messages.
We could handle this by just calling recvmsg again. But this is mainly
because I can't think of a proper errno code for this either :)

  reply	other threads:[~2006-09-29 14:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-29 12:10 [PATCH] libnfnetlink Maik Hentsche
2006-09-29 14:18 ` Patrick McHardy [this message]
2006-10-02 13:47   ` Pablo Neira Ayuso
2006-10-11 10:32     ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2006-10-09 15:07 Maik Hentsche
2006-10-09 15:14 ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451D2B3B.7070604@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=netfilter@mm-double.de \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.