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".
This commit is contained in:
paul 2004-07-09 12:24:42 +00:00
parent f5ba387492
commit b06c14f2e7
2 changed files with 10 additions and 1 deletions

View 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> 2004-06-30 Greg Troxel <gdt@poblano.ir.bbn.com>
* Makefile.am: Make libzebra shared. * Makefile.am: Make libzebra shared.

View File

@ -74,10 +74,14 @@ if_cmp_func (struct interface *ifp1, struct interface *ifp2)
return res; return res;
/* with identical name part, go to numeric part */ /* with identical name part, go to numeric part */
p1 += l1; p1 += l1;
p2 += l1; p2 += l1;
if (!*p1)
return -1;
if (!*p2)
return 1;
x1 = strtol(p1, &p1, 10); x1 = strtol(p1, &p1, 10);
x2 = strtol(p2, &p2, 10); x2 = strtol(p2, &p2, 10);