Message ID | 20191122072102.248636-3-zenczykowski@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | [1/3] net: inet_is_local_reserved_port() should return bool not int | expand |
diff --git a/include/net/ip.h b/include/net/ip.h index a92f157bb115..f00e00d15155 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -353,7 +353,8 @@ static inline bool sysctl_dev_name_is_allowed(const char *name) static inline bool inet_port_requires_bind_service(struct net *net, int port) { - return port < net->ipv4.sysctl_ip_prot_sock; + return port < net->ipv4.sysctl_ip_prot_sock || + inet_is_local_reserved_port(net, port); } #else