Skip to content

Commit

Permalink
rxrpc: Fix checking of error from ip6_route_output()
Browse files Browse the repository at this point in the history
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 <dan.carpenter@oracle.com>
Fixes: 75b54cb ("rxrpc: Add IPv6 support")
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Oct 13, 2016
1 parent 54fde42 commit 07096f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rxrpc/peer_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 07096f6

Please sign in to comment.