]> 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 b9813cf3d91c6ea8a99fa3e63f8f19636eae8e14..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;
 }
 
@@ -1043,6 +1046,9 @@ SCTP_STATIC __init int sctp_init(void)
        sctp_max_retrans_path           = 5;
        sctp_max_retrans_init           = 8;
 
+       /* Sendbuffer growth        - do per-socket accounting */
+       sctp_sndbuf_policy              = 0;
+
        /* HB.interval              - 30 seconds */
        sctp_hb_interval                = 30 * HZ;
 
@@ -1159,8 +1165,6 @@ SCTP_STATIC __init int sctp_init(void)
        status = 0;
 out:
        return status;
-err_add_protocol:
-       proto_unregister(&sctp_prot);
 err_ctl_sock_init:
        sctp_v6_exit();
 err_v6_init:
@@ -1188,6 +1192,8 @@ err_bucket_cachep:
        inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
        inet_unregister_protosw(&sctp_seqpacket_protosw);
        inet_unregister_protosw(&sctp_stream_protosw);
+err_add_protocol:
+       proto_unregister(&sctp_prot);
        goto out;
 }