Skip to content

Commit 84dad55

Browse files
Paolo Abenidavem330
authored andcommitted
udp6: fix encap return code for resubmitting
The commit eb63f29 ("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: eb63f29 ("udp6: add missing checks on edumux packet processing") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b3bc7d commit 84dad55

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/ipv6/udp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,11 +766,9 @@ static int udp6_unicast_rcv_skb(struct sock *sk, struct sk_buff *skb,
766766

767767
ret = udpv6_queue_rcv_skb(sk, skb);
768768

769-
/* a return value > 0 means to resubmit the input, but
770-
* it wants the return to be -protocol, or 0
771-
*/
769+
/* a return value > 0 means to resubmit the input */
772770
if (ret > 0)
773-
return -ret;
771+
return ret;
774772
return 0;
775773
}
776774

0 commit comments

Comments
 (0)