All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] net: inet_is_local_reserved_port() should return bool not int
@ 2019-11-22  7:21 Maciej Żenczykowski
  2019-11-22  7:21 ` [PATCH 2/3] net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port) Maciej Żenczykowski
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Maciej Żenczykowski @ 2019-11-22  7:21 UTC (permalink / raw)
  To: Maciej Żenczykowski, David S . Miller; +Cc: netdev, Eric Dumazet

From: Maciej Żenczykowski <maze@google.com>

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
---
 include/net/ip.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net/ip.h b/include/net/ip.h
index a2c61c36dc4a..cebf3e10def1 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -339,10 +339,10 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o
 void inet_get_local_port_range(struct net *net, int *low, int *high);
 
 #ifdef CONFIG_SYSCTL
-static inline int inet_is_local_reserved_port(struct net *net, int port)
+static inline bool inet_is_local_reserved_port(struct net *net, int port)
 {
 	if (!net->ipv4.sysctl_local_reserved_ports)
-		return 0;
+		return false;
 	return test_bit(port, net->ipv4.sysctl_local_reserved_ports);
 }
 
@@ -357,9 +357,9 @@ static inline int inet_prot_sock(struct net *net)
 }
 
 #else
-static inline int inet_is_local_reserved_port(struct net *net, int port)
+static inline bool inet_is_local_reserved_port(struct net *net, int port)
 {
-	return 0;
+	return false;
 }
 
 static inline int inet_prot_sock(struct net *net)
-- 
2.24.0.432.g9d3f5f5b63-goog


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-26 21:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22  7:21 [PATCH 1/3] net: inet_is_local_reserved_port() should return bool not int Maciej Żenczykowski
2019-11-22  7:21 ` [PATCH 2/3] net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port) Maciej Żenczykowski
2019-11-22  7:21 ` [PATCH 3/3] net: Fail explicit unprivileged bind to local reserved ports Maciej Żenczykowski
2019-11-22 18:06 ` [PATCH 1/3] net: inet_is_local_reserved_port() should return bool not int David Miller
2019-11-22 21:48   ` Maciej Żenczykowski
2019-11-22 21:50     ` [PATCH] " Maciej Żenczykowski
2019-11-23  0:55       ` Jakub Kicinski
2019-11-23  3:31         ` Maciej Żenczykowski
2019-11-24  9:24     ` [PATCH 1/3] " Maciej Żenczykowski
2019-11-24  9:27       ` [PATCH] net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port) Maciej Żenczykowski
2019-11-25 22:45         ` David Miller
2019-11-25 23:32           ` Maciej Żenczykowski
2019-11-25 23:37             ` [PATCH v2] " Maciej Żenczykowski
2019-11-26 21:20               ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.