Now that wheezy's been released -- without the patch I submitted over a
year ago -- I have to fix all of my machines again, so I've respun the
patch, and here it is.  Not that I have a great deal of hope that
submitting it here will actually cause anything to happen.

Index: bird-1.3.7/nest/iface.c
===================================================================
--- bird-1.3.7.orig/nest/iface.c        2013-05-06 11:35:21.000000000 +0100
+++ bird-1.3.7/nest/iface.c     2013-05-06 11:37:13.000000000 +0100
@@ -289,7 +289,7 @@
 struct iface *
 if_update(struct iface *new)
 {
-  struct iface *i;
+  struct iface *i, *j, *jj;
   unsigned c;
 
   WALK_LIST(i, iface_list)
@@ -324,6 +324,26 @@
   init_list(&i->neighbors);
   i->flags |= IF_UPDATED | IF_TMP_DOWN;                /* Tmp down as we don't 
have addresses yet */
   add_tail(&iface_list, &i->n);
+
+  /* If we're unlucky then what just happened is that an interface had its
+   * name changed.  In that case, we've just invented a new iface node with
+   * the new name, but with the same index number as an existing node, and
+   * we've just arranged so that a search by index will find the old node and
+   * not the new one.  This isn't good, so trawl through the list again,
+   * picking out nodes with colliding indices and moving them to the end of
+   * the list.
+   */
+  WALK_LIST_DELSAFE(j, jj, iface_list)
+    {
+      if (i == j)
+       break;
+      else if (i->index == j->index)
+       {
+         rem_node(&j->n);
+         add_tail(&iface_list, &j->n);
+       }
+    }
+
   return i;
 }
 

-- [mdw]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to