]> git.hungrycats.org Git - linux/commitdiff
sock_register inet6_family_ops before we do init
authorDavid S. Miller <davem@nuts.ninka.net>
Sun, 10 Mar 2002 22:13:40 +0000 (14:13 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 10 Mar 2002 22:13:40 +0000 (14:13 -0800)
calls which might try to create ipv6 sockets.

net/ipv6/af_inet6.c

index 628bf2fb97c815d5f8a0cc5e71065cef6ca6d6e4..4cceee46c88ff8e0f2c2d16a2d9e836bb135ea91 100644 (file)
@@ -675,6 +675,11 @@ static int __init inet6_init(void)
         */
        inet6_register_protosw(&rawv6_protosw);
 
+       /* Register the family here so that the init calls below will
+        * be able to create sockets. (?? is this dangerous ??)
+        */
+       (void) sock_register(&inet6_family_ops);
+       
        /*
         *      ipngwg API draft makes clear that the correct semantics
         *      for TCP and UDP is to consider one TCP and UDP instance
@@ -719,9 +724,6 @@ static int __init inet6_init(void)
        udpv6_init();
        tcpv6_init();
 
-       /* Now the userspace is allowed to create INET6 sockets. */
-       (void) sock_register(&inet6_family_ops);
-       
        return 0;
 
 #ifdef CONFIG_PROC_FS