Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84dad559 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

udp6: fix encap return code for resubmitting



The commit eb63f296 ("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: eb63f296 ("udp6: add missing checks on edumux packet processing")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b3bc7db
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -766,11 +766,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;
}