diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2022-11-18 21:25:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-21 16:05:39 +0300 |
commit | 7a7160edf1bfde25422262fb26851cef65f695d3 (patch) | |
tree | fdc0257f0c6b52d6e30b8d9d6f4a694a21d467b8 /net/core | |
parent | 1cb50726329070a6e3235b6bac38dfb8d5fd18c2 (diff) | |
download | linux-7a7160edf1bfde25422262fb26851cef65f695d3.tar.xz |
net: Return errno in sk->sk_prot->get_port().
We assume the correct errno is -EADDRINUSE when sk->sk_prot->get_port()
fails, so some ->get_port() functions return just 1 on failure and the
callers return -EADDRINUSE instead.
However, mptcp_get_port() can return -EINVAL. Let's not ignore the error.
Note the only exception is inet_autobind(), all of whose callers return
-EAGAIN instead.
Fixes: cec37a6e41aa ("mptcp: Handle MP_CAPABLE options for outgoing connections")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions