]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Allows IP of loopback to be used in automatic router ID selection.
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 16 Apr 2013 15:53:22 +0000 (17:53 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 16 Apr 2013 15:53:22 +0000 (17:53 +0200)
Thanks to Alexander V. Chernikov for the patch.

nest/iface.c

index da79b21f7d452d93c9e7651a8cb6c1d27a5dd0a5..b4ab70c3adf355c2e0dfcc284912a55d412ece0d 100644 (file)
@@ -589,7 +589,7 @@ if_choose_router_id(struct iface_patt *mask, u32 old_id)
   WALK_LIST(i, iface_list)
     {
       if (!(i->flags & IF_ADMIN_UP) ||
-         (i->flags & (IF_IGNORE | IF_SHUTDOWN)))
+         (i->flags & IF_SHUTDOWN))
        continue;
 
       WALK_LIST(a, i->addrs)
@@ -612,6 +612,10 @@ if_choose_router_id(struct iface_patt *mask, u32 old_id)
          if (mask && !iface_patt_match(mask, i, a))
            continue;
 
+         /* FIXME: This should go away too */
+         if ((i->flags & IF_IGNORE) && !mask)
+           continue;
+
          /* No pattern or pattern matched */
          if (!b || ipa_to_u32(a->ip) < ipa_to_u32(b->ip))
            b = a;