Eric Dumazet <[email protected]> wrote:
> @@ -1181,6 +1177,9 @@ int rxrpc_input_packet(struct sock *udp_sk, struct
> sk_buff *skb)
>
> _enter("%p", udp_sk);
>
> + if (!local)
> + return -ENOENT;
> +
>
This looks wrong. Did you mean "return -AF_INET"?
The comment in net/ipv6/udp.c says:
/*
* This is an encapsulation socket so pass the skb to
* the socket's udp_encap_rcv() hook. Otherwise, just
* fall through and pass this up the UDP socket.
* up->encap_rcv() returns the following value:
* =0 if skb was successfully passed to the encap
* handler or was discarded by it.
* >0 if skb should be passed on to UDP.
* <0 if skb should be resubmitted as proto -N
*/
This suggests that -ENOENT is not a valid return. Should you "goto discard"
instead - or just discard the packet and return 0?
David