Buch-Pedersen, Leif wrote:
> Hello,

Hello Leif!

> I am returning to the problem I experienced one month ago (and still
> have) with MIPL 2.0.1 running as MN, where BU's is never sent, mip6d
> appears to be hanging and can not be stopped by ctrl-c.
> 
> I think I have found the place where the problem occurs: 
> 
> The routine rtnl_ext_listen in rtnl.c makes a call to recvmsg. This call
> returns a status of -1 and an error EINVAL that indicates a parameter
> problem. This does not cause rtnl_ext_listen to exit. It continues and
> enters the loop starting with  "for (h ="  where it goes into an endless
> loop, that is the reason why ctrl-c does not stop the program. By
> inserting in the loop a 1 microsecond sleep it gets slowed down so it
> can be aborted and ctrl-c works again. This obviously does not solve the
> problem of BU's not being sent and I am assuming the parameter problem
> is the reason. Any suggestions on solving the problem would be highly
> appreciated.

Thanks for tracking this down. AFAICS there is really no reason for
rtnl_ext_listen() *not* to exit if recvmsg() fails. Would you try the
attached patch to see if it works?

Regards,
Ville

===== src/rtnl.c 1.51 vs edited =====
--- 1.51/src/rtnl.c	2006-02-22 16:21:55 +02:00
+++ edited/src/rtnl.c	2006-04-19 13:12:57 +03:00
@@ -118,7 +118,7 @@
 		iov.iov_len = sizeof(buf);
 		status = recvmsg(rtnl->fd, &msg, 0);
 
-		if (status < 0 && errno == EBADF)
+		if (status < 0)
 			return -1;
 
 		if (status == 0)
_______________________________________________
mipl mailing list
[email protected]
http://www.mobile-ipv6.org/cgi-bin/mailman/listinfo/mipl

Reply via email to