Re: [PATCH net-next 1/2] net/ipv6/udp: Add encap_rcv support to IPv6 UDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From: Benjamin LaHaise <bcrl@xxxxxxxxx>
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@xxxxxxxxx>

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

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@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux