netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: bcrl@kvack.org
Cc: jchapman@katalix.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net/ipv6/udp: Add encap_rcv support to IPv6 UDP
Date: Fri, 13 Apr 2012 13:24:46 -0400 (EDT)	[thread overview]
Message-ID: <20120413.132446.79547904328484363.davem@davemloft.net> (raw)
In-Reply-To: <20120411022047.GA19124@kvack.org>

From: Benjamin LaHaise <bcrl@kvack.org>
Date: Tue, 10 Apr 2012 22:20:47 -0400

> At present, UDP encapsulated protocols (like L2TP) are only able to use the
> encap_rcv hook with UDP over IPv4.  This patch adds the same support for use
> with UDP over IPv6.
> 
> Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>

This isn't right at all.

The return value of udpv6_queue_rcv_skb() ignorred at all
call sites except when it is invoked via ->backlog_rcv(), which
expects a different kind of return value, not an encap operation
indication.

So the whole "requeue as proto '-N'" logic isn't going to ever work.

You need to do what the ipv4 side does, split the routine into
two parts:

1) A __udpv6_queue_rcv_skb() which purely handles socket queueing
   cases.  It does not handle encap or anything like that.

   This is what is what you hook into ->backlog_rcv for ipv6 udp.

2) A udpv6_queue_rcv_skb() which is invoked by the UDPv6 socket demux
   on receive, and which will properly propagate the return values
   back down into ipv6 input to do the "requeue as proto '-N'" stuff.

Please resubmit both of these patches once you've fixed this up (and
tested it).

      parent reply	other threads:[~2012-04-13 17:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  2:20 [PATCH net-next 1/2] net/ipv6/udp: Add encap_rcv support to IPv6 UDP Benjamin LaHaise
2012-04-11 11:51 ` James Chapman
2012-04-13 17:24 ` David Miller [this message]

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=20120413.132446.79547904328484363.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bcrl@kvack.org \
    --cc=jchapman@katalix.com \
    --cc=netdev@vger.kernel.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 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).