lkml.org 
[lkml]   [2002]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.5.5-dj1 - IPv6 not loading correctly.
On Sun, Feb 24, 2002 at 10:16:16PM -0800, Ben Clifford wrote:

> 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.

This probably happened during acme's recent protocol cleanups,
and is probably a problem in mainline as well as -dj.

> 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?

I'll let davem/acme comment on the correctness of the fix..
Looks straightforward enough to me, but I'm not as kneedeep in
networking internals as those two 8-)

>
> - --- /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
>

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.064 / U:31.424 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site