From: Paolo Abeni Date: Wed, 17 Oct 2018 09:44:04 +0000 (+0200) Subject: udp6: fix encap return code for resubmitting X-Git-Tag: v4.14.79~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=189771d69e14404b0e6eb57aa40bed2a95f7e2c2;p=platform%2Fkernel%2Flinux-exynos.git udp6: fix encap return code for resubmitting [ Upstream commit 84dad55951b0d009372ec21760b650634246e144 ] The commit eb63f2964dbe ("udp6: add missing checks on edumux packet processing") used the same return code convention of the ipv4 counterpart, but ipv6 uses the opposite one: positive values means resubmit. This change addresses the issue, using positive return value for resubmitting. Also update the related comment, which was broken, too. Fixes: eb63f2964dbe ("udp6: add missing checks on edumux packet processing") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 5cee941..8d185a0f 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -794,11 +794,9 @@ static int udp6_unicast_rcv_skb(struct sock *sk, struct sk_buff *skb, ret = udpv6_queue_rcv_skb(sk, skb); - /* a return value > 0 means to resubmit the input, but - * it wants the return to be -protocol, or 0 - */ + /* a return value > 0 means to resubmit the input */ if (ret > 0) - return -ret; + return ret; return 0; }