Re: Linux 2.5.5-dj1 - IPv6 not loading correctly.

From: Ben Clifford (benc@hawaga.org.uk)
Date: Mon Feb 25 2002 - 01:16:16 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 24 Feb 2002, Ben Clifford wrote:

> When ipv6.o is loaded, I get:
>
> IPv6 v0.8 for NET4.0
> Failed to initialize the ICMP6 control socket (err -97)
>
> and lsmod shows:
> ipv6 147968 -1 (uninitialized)

More info on this:

Looking at the code, the the ICMP6 control socket error is occurring
because sock_register isn't called for inet6 until after the ICMP6 control
socket is created (in af_inet6.c).

However, the ICMP6 control socket create calls sock_create, which requires
sock_register to have already been called.

I have made the below change, which moves the protocol family registration
higher up in the code. It seems to make ipv6 work now.

However, I'm concerned that this gives a small amount of time when the
family is registered but not fully initialised.

Is this bad?

- --- /mnt/dev/hda11/2.5.5-dj1-snark-not-changed-much/net/ipv6/af_inet6.c Tue Feb 19 18:10:53 2002
+++ 2.5.5-dj1/net/ipv6/af_inet6.c Sun Feb 24 22:13:38 2002
@@ -675,6 +675,13 @@
          */
         inet6_register_protosw(&rawv6_protosw);

+ /* register the family here so that the init calls below will
+ * work. ?? 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 +726,6 @@
         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

- --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8eda0sYXoezDwaVARAn+uAJ4o8hCamGZzX6UnJVH8PWYfjLzBFQCeLZxw
Fofq4Yo27N2juaxaMdZ+aXw=
=so8+
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 28 2002 - 21:00:12 EST