]> err.no Git - linux-2.6/blobdiff - net/sctp/protocol.c
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / net / sctp / protocol.c
index 2e1f9c3556f5922a9018c30055949f7a64f333be..5135e1a25d25c1413984520c7204f6df3d7d2df4 100644 (file)
@@ -378,10 +378,13 @@ static int sctp_v4_available(union sctp_addr *addr, struct sctp_sock *sp)
 {
        int ret = inet_addr_type(addr->v4.sin_addr.s_addr);
 
-       /* FIXME: ip_nonlocal_bind sysctl support. */
 
-       if (addr->v4.sin_addr.s_addr != INADDR_ANY && ret != RTN_LOCAL)
+       if (addr->v4.sin_addr.s_addr != INADDR_ANY &&
+          ret != RTN_LOCAL &&
+          !sp->inet.freebind &&
+          !sysctl_ip_nonlocal_bind)
                return 0;
+
        return 1;
 }