Laliace Bougnat wrote:
> Hi Ville,

Hi Mathieu,

thanks for the gdb dump, it was very helpful! Would you try the attached
patch and see if it helps?

Regards,
Ville
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2006/06/22 16:04:17+03:00 [EMAIL PROTECTED] 
#   Fix segmentation fault reported on mipl mailing list.
# 
# src/movement.c
#   2006/06/22 16:04:17+03:00 [EMAIL PROTECTED] +3 -3
#   make sure md_router all list_heads have been initiated before calling
#   __md_free_router() in md_create_router()
# 
diff -Nru a/src/movement.c b/src/movement.c
--- a/src/movement.c	2006-06-22 16:05:07 +03:00
+++ b/src/movement.c	2006-06-22 16:05:07 +03:00
@@ -894,6 +894,8 @@
 	memset(new, 0, sizeof(struct md_router));
 	clock_gettime(CLOCK_REALTIME, &new->timestamp);
 	INIT_LIST_HEAD(&new->prefixes);
+	INIT_LIST_HEAD(&new->list);
+	INIT_LIST_HEAD(&new->tqe.list);
 
 	while (optlen > 1) {
 		int olen = opt[1] << 3;
@@ -956,8 +958,6 @@
 	if (new->prefix_cnt == 0)
 		goto free_rtr;
 	
-	INIT_LIST_HEAD(&new->list);
-	INIT_LIST_HEAD(&new->tqe.list);
 	new->iface = iface;
 	new->hoplimit = ra->nd_ra_curhoplimit;
 	new->ra_flags = ra->nd_ra_flags_reserved;
@@ -977,7 +977,7 @@
 
 	MDBG3("creating new router "
 	      "%x:%x:%x:%x:%x:%x:%x:%x on interface %s (%d)\n", 
-	     NIP6ADDR(saddr), iface->name, iface->ifindex);
+	      NIP6ADDR(saddr), iface->name, iface->ifindex);
 
 	return new;
 free_rtr:
_______________________________________________
mipl mailing list
[email protected]
http://www.mobile-ipv6.org/cgi-bin/mailman/listinfo/mipl

Reply via email to