netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kaber@trash.net
Cc: remi.denis-courmont@nokia.com, jchapman@katalix.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-2.6.23 take2] UDP: Cleanup UDP encapsulation code
Date: Tue, 10 Jul 2007 23:06:54 -0700 (PDT)	[thread overview]
Message-ID: <20070710.230654.03111146.davem@davemloft.net> (raw)
In-Reply-To: <468E444C.9070609@trash.net>

From: Patrick McHardy <kaber@trash.net>
Date: Fri, 06 Jul 2007 15:31:56 +0200

> Rémi Denis-Courmont wrote:
> > On Thursday 05 July 2007 20:25:50 ext James Chapman wrote:
> > 
> >>Rémi Denis-Courmont wrote:
> >>
> >>>By the way, couldn't encap_type be remove altogether (using two slightly
> >>>different callbacks for ESP) from udp_sock?
> >>
> >>The notion of encap_type is needed for the setsockopt call so it would
> >>have to stay in the API. If it were removed from udp_sock, getsockopt
> >>would have to derive the encap_type from encap_rcv funcptr values, which
> >>would be messy. I think it might complicate the logic in ESP too.
> > 
> > 
> > Right. By the way, shouldn't "len" rather be signed in there?
> > 
> > 		unsigned int len;
> > 
> > 		/* if we're overly short, let UDP handle it */
> > 		len = skb->len - sizeof(struct udphdr);
> > 		if (len <= 0)
> > 			goto udp;
> 
> 
> It should, but the < 0 case can't happen since __udp4_lib_rcv
> already makes sure that we have at least a complete UDP header.
> 
> Anyways, this patch fixes it.
> 
> Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied, thanks.

  reply	other threads:[~2007-07-11  6:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 16:18 [PATCH net-2.6.23 take2] UDP: Cleanup UDP encapsulation code James Chapman
2007-07-05 16:45 ` Patrick McHardy
2007-07-05 16:50   ` Rémi Denis-Courmont
2007-07-05 17:25     ` James Chapman
2007-07-06  7:55       ` Rémi Denis-Courmont
2007-07-06 13:31         ` Patrick McHardy
2007-07-11  6:06           ` David Miller [this message]
2007-07-06  0:08   ` David Miller

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=20070710.230654.03111146.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jchapman@katalix.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=remi.denis-courmont@nokia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).