Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git] / net / sctp / protocol.c
index b9813cf..e7f37fa 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,8 +1046,14 @@ 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;
+       sctp_hb_interval                = SCTP_DEFAULT_TIMEOUT_HEARTBEAT;
+
+       /* delayed SACK timeout */
+       sctp_sack_timeout               = SCTP_DEFAULT_TIMEOUT_SACK;
 
        /* Implementation specific variables. */
 
@@ -1159,8 +1168,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 +1195,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;
 }