lkml.org 
[lkml]   [1998]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectAnother one for you (Re: Linux 2.1.131ac5 released)
Date
Found another one... this fixes an inability to bind to multicast ports in
the masq range. The problem prevents me from listening to the IETF mbone
video broadcast (channel 1).

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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.582 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site