Index: exp.20/net/ipv4/af_inet.c
--- exp.20/net/ipv4/af_inet.c Thu, 19 Nov 1998 08:23:00 +0100 smurf (kernel_linux/l/21_af_inet.c 1.79.1.37 644)
+++ exp.21/net/ipv4/af_inet.c Tue, 08 Dec 1998 03:38:16 +0100 smurf (kernel_linux/l/21_af_inet.c 1.79.1.38 644)
@@ -513,10 +513,12 @@
(sk->num != 0))
return -EINVAL;
+ chk_addr_ret = inet_addr_type(addr->sin_addr.s_addr);
snum = ntohs(addr->sin_port);
#ifdef CONFIG_IP_MASQUERADE
/* The kernel masquerader needs some ports. */
- if((snum >= PORT_MASQ_BEGIN) && (snum <= PORT_MASQ_END))
+ if(chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST &&
+ (snum >= PORT_MASQ_BEGIN) && (snum <= PORT_MASQ_END))
return -EADDRINUSE;
#endif
if (snum == 0)
@@ -524,7 +526,6 @@
if (snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE))
return(-EACCES);
- chk_addr_ret = inet_addr_type(addr->sin_addr.s_addr);
if (addr->sin_addr.s_addr != 0 && chk_addr_ret != RTN_LOCAL &&
chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST) {
#ifdef CONFIG_IP_TRANSPARENT_PROXY
-- Matthias Urlichs | noris network GmbH | smurf@noris.de | ICQ: 20193661- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/