[1247] in linux-net channel archive

home help back first fref pref prev next nref lref last post

1.3.36 looping in af_inet.c ?

daemon@ATHENA.MIT.EDU (christian mock)
Wed Oct 25 04:36:52 1995

Date: Tue, 24 Oct 1995 23:30:25 +0100 (MET)
From: christian mock <cm@kukuruz.ping.at>
To: Alan Cox <alan@cymru.net>
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <199509051726.SAA32055@snowcrash.cymru.net>

hi,

investigating why 1.3.36 just dies when named is started (exactely, when 
named tries to bind to 0.0.0.0 -- the binds for the configured interfaces 
return OK), I found the following in af_inet.c (approx. line 225):

	/*
	 * add the socket to the sock_array[]..
	 */
	skp = sk->prot->sock_array + num;
	cli();
	while ((tmp = *skp) != NULL) {
		if (!(tmp->rcv_saddr & mask))
			break;
	}
	sk->next = tmp;
	*skp = sk;
	sti();

the only thing I'm sure of is that I don't understand the purpose of the 
code, but probably something like

	tmp=*skp;
	while (tmp != NULL) {
		if (!(tmp->rcv_saddr & mask))
			break;
		tmp = tmp->next;
	}

is meant? gonna recompile my kernel now and see...

ciao,

cm.


home help back first fref pref prev next nref lref last post