From: David Howells Date: Thu, 13 Oct 2016 07:43:17 +0000 (+0100) Subject: rxrpc: Fix checking of error from ip6_route_output() X-Git-Tag: v4.9.8~1026^2~107^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07096f612fdf2bb5578cd1fecb2884bdbb1cde42;p=platform%2Fkernel%2Flinux-rpi3.git rxrpc: Fix checking of error from ip6_route_output() ip6_route_output() doesn't return a negative error when it fails, rather the ->error field of the returned dst_entry struct needs to be checked. Reported-by: Dan Carpenter Fixes: 75b54cb57ca3 ("rxrpc: Add IPv6 support") Signed-off-by: David Howells --- diff --git a/net/rxrpc/peer_object.c b/net/rxrpc/peer_object.c index 941b724..862eea6 100644 --- a/net/rxrpc/peer_object.c +++ b/net/rxrpc/peer_object.c @@ -193,8 +193,8 @@ static void rxrpc_assess_MTU_size(struct rxrpc_peer *peer) fl6->fl6_dport = htons(7001); fl6->fl6_sport = htons(7000); dst = ip6_route_output(&init_net, NULL, fl6); - if (IS_ERR(dst)) { - _leave(" [route err %ld]", PTR_ERR(dst)); + if (dst->error) { + _leave(" [route err %d]", dst->error); return; } break;