All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kiran Kumar Immidi <immidi@spymac.com>
To: Patrick McHardy <kaber@trash.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: Re: [PATCH]: Fix invalid return values from sctp_new
Date: Mon, 20 Sep 2004 14:09:16 +0530	[thread overview]
Message-ID: <200409201408.35538.immidi@spymac.com> (raw)
In-Reply-To: <414E9493.3020800@trash.net>

On Monday 20 September 2004 13:58, Patrick McHardy wrote:

> there are multiple places in sctp_new where it returns -1, but
> it looks like it really wants to return "invalid". The call to
> protocol->new in init_conntrack looks like this:
>
>         if (!protocol->new(conntrack, skb)) {
>                 kmem_cache_free(ip_conntrack_cachep, conntrack);
>                 return NULL;
>         }
>
> so it has to return 0 to say "invalid". Please check if the
> attached patch which fixes these places is correct.

  This seems fair. But the place I copied this from 
[ ip_conntrack_proto_tcp.c:tcp_new() ]  also needs to be fixed I guess..

@@ -237,7 +237,7 @@
        struct tcphdr tcph;

        if (skb_copy_bits(skb, skb->nh.iph->ihl * 4, &tcph, sizeof(tcph)) != 
0)
-               return -1;
+               return 0;


-- 
Regards,
Kiran Kumar Immidi

  reply	other threads:[~2004-09-20  8:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20  8:28 [PATCH]: Fix invalid return values from sctp_new Patrick McHardy
2004-09-20  8:39 ` Kiran Kumar Immidi [this message]
2004-09-20  9:02   ` Patrick McHardy
2004-09-20  9:26     ` Kiran Kumar Immidi
2004-09-20  9:40       ` Patrick McHardy

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=200409201408.35538.immidi@spymac.com \
    --to=immidi@spymac.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@lists.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.