]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2004-07-09 Juris Kalnins <juris@mt.lv>
authorpaul <paul>
Fri, 9 Jul 2004 12:24:42 +0000 (12:24 +0000)
committerpaul <paul>
Fri, 9 Jul 2004 12:24:42 +0000 (12:24 +0000)
        * if.c: (if_cmp_func) fix for interface names where name is same,
          but one has no number, eg "devtyp" and "devtyp0".

lib/ChangeLog
lib/if.c

index 8cd79e3630df36b016fa9523334ff993a91d7913..4ec441ae6ba592a754c1654a81b31e8092ba20fb 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-09 Juris Kalnins <juris@mt.lv>
+
+       * if.c: (if_cmp_func) fix for interface names where name is same,
+         but one has no number, eg "devtyp" and "devtyp0".
+         
 2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
 
        * Makefile.am: Make libzebra shared.
index ff5ec50aaca18c84eb38f36e5d224ba06ef684cb..2e36eff361e4bc7f386c1bd36891cc81100a3924 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -74,10 +74,14 @@ if_cmp_func (struct interface *ifp1, struct interface *ifp2)
       return res;
 
     /* with identical name part, go to numeric part */
-
     p1 += l1;
     p2 += l1;
 
+    if (!*p1) 
+      return -1;
+    if (!*p2) 
+      return 1;
+
     x1 = strtol(p1, &p1, 10);
     x2 = strtol(p2, &p2, 10);