Page MenuHomeFreeBSD

D1814.id4201.diff
No OneTemporary

D1814.id4201.diff

Index: sbin/ifconfig/ifconfig.c
===================================================================
--- sbin/ifconfig/ifconfig.c
+++ sbin/ifconfig/ifconfig.c
@@ -1280,9 +1280,8 @@
}
/* turn interface and unit into module name */
- strcpy(ifkind, "if_");
- strlcpy(ifkind + MOD_PREFIX_LEN, ifname,
- sizeof(ifkind) - MOD_PREFIX_LEN);
+ strlcpy(ifkind, "if_", sizeof(ifkind));
+ strlcat(ifkind, ifname, sizeof(ifkind));
/* scan files in kernel */
mstat.version = sizeof(struct module_stat);
@@ -1299,8 +1298,8 @@
cp = mstat.name;
}
/* already loaded? */
- if (strncmp(ifname, cp, strlen(ifname) + 1) == 0 ||
- strncmp(ifkind, cp, strlen(ifkind) + 1) == 0)
+ if (strcmp(ifname, cp) == 0 ||
+ strcmp(ifkind, cp) == 0)
return;
}
}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 29, 9:23 PM (2 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32396800
Default Alt Text
D1814.id4201.diff (782 B)

Event Timeline