]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv6: fix return value of ip6_skb_dst_mtu
authorVadim Fedorenko <vfedorenko@novek.ru>
Thu, 1 Jul 2021 23:47:00 +0000 (02:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jul 2021 12:35:14 +0000 (14:35 +0200)
commit2047ba43eef98a041954fb0cb01e2e4676ac4feb
treee504b93b6075cd015af18f34a086e5e0edf26748
parent0b6df418588b26957485181cb1b2e5050ca44985
net: ipv6: fix return value of ip6_skb_dst_mtu

commit 40fc3054b45820c28ea3c65e2c86d041dc244a8a upstream.

Commit 3863014e58fb ("[INET]: Add IP(V6)_PMTUDISC_RPOBE") introduced
ip6_skb_dst_mtu with return value of signed int which is inconsistent
with actually returned values. Also 2 users of this function actually
assign its value to unsigned int variable and only __xfrm6_output
assigns result of this function to signed variable but actually uses
as unsigned in further comparisons and calls. Change this function
to return unsigned int value.

Fixes: 3863014e58fb ("[INET]: Add IP(V6)_PMTUDISC_RPOBE")
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ip6_route.h
net/ipv6/xfrm6_output.c