[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120413.132446.79547904328484363.davem@davemloft.net>
Date: Fri, 13 Apr 2012 13:24:46 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: bcrl@...ck.org
Cc: jchapman@...alix.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net/ipv6/udp: Add encap_rcv support to
IPv6 UDP
From: Benjamin LaHaise <bcrl@...ck.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@...ck.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).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists