On Tue, Apr 23, 2019 at 9:55 AM David Howells <dhowe...@redhat.com> wrote:
>
> Eric Dumazet <eduma...@google.com> 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?


Oh right, I guess I got confused by vxlan_err_lookup(), I must have
scrolled down from (correct) vxlan_rcv()

I will send a v2.

Reply via email to