]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/sctp/protocol.c
[NET]: Cleanup INET_REFCNT_DEBUG code
[net-next-2.6.git] / net / sctp / protocol.c
index 2e1f9c3556f5922a9018c30055949f7a64f333be..8d3f8096b8735e307bff00ab5c5befe6fac18212 100644 (file)
@@ -219,7 +219,7 @@ static void sctp_free_local_addr_list(void)
 
 /* Copy the local addresses which are valid for 'scope' into 'bp'.  */
 int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
-                             int gfp, int copy_flags)
+                             unsigned int __nocast gfp, int copy_flags)
 {
        struct sctp_sockaddr_entry *addr;
        int error = 0;
@@ -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;
 }
 
@@ -590,9 +593,7 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
        newinet->mc_index = 0;
        newinet->mc_list = NULL;
 
-#ifdef INET_REFCNT_DEBUG
-       atomic_inc(&inet_sock_nr);
-#endif
+       sk_refcnt_debug_inc(newsk);
 
        if (newsk->sk_prot->init(newsk)) {
                sk_common_release(newsk);
@@ -1047,7 +1048,10 @@ SCTP_STATIC __init int sctp_init(void)
        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. */