diff options
author | Eric Dumazet <edumazet@google.com> | 2023-12-14 22:29:38 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-12-16 04:56:27 +0300 |
commit | 41db7626b73210cb99eea9cf672dcfce58c68ab2 (patch) | |
tree | f88e34c3a8393a0145047daa6239f9202d6b3121 /include | |
parent | 758a8d5b6a64ad63a8c0728f68dd3e21481013db (diff) | |
download | linux-41db7626b73210cb99eea9cf672dcfce58c68ab2.tar.xz |
inet: returns a bool from inet_sk_get_local_port_range()
Change inet_sk_get_local_port_range() to return a boolean,
telling the callers if the port range was provided by
IP_LOCAL_PORT_RANGE socket option.
Adds documentation while we are at it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20231214192939.1962891-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index b31be912489a..de0c69c57e3c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -356,7 +356,7 @@ static inline void inet_get_local_port_range(const struct net *net, int *low, in *low = range & 0xffff; *high = range >> 16; } -void inet_sk_get_local_port_range(const struct sock *sk, int *low, int *high); +bool inet_sk_get_local_port_range(const struct sock *sk, int *low, int *high); #ifdef CONFIG_SYSCTL static inline bool inet_is_local_reserved_port(struct net *net, unsigned short port) |