1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

o Strict interface names comparison. The old code assumed "fxp1" == "fxp11".

o Use an appropriate constant for interface name buffer.

Reviewed by:	luigi
Approved by:	luigi
MFC after:	1 month
This commit is contained in:
Maxim Konovalov 2002-07-03 11:00:55 +00:00
parent d7f9ecc86b
commit b4eabccf51
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99339

View File

@ -436,10 +436,10 @@ parse_bdg_cfg()
* now search in interface list for a matching name
*/
TAILQ_FOREACH(ifp, &ifnet, if_link) {
char buf[32];
char buf[IFNAMSIZ];
sprintf(buf, "%s%d", ifp->if_name, ifp->if_unit);
if (!strncmp(beg, buf, l)) {
snprintf(buf, sizeof(buf), "%s%d", ifp->if_name, ifp->if_unit);
if (!strncmp(beg, buf, max(l, strlen(buf)))) {
struct bdg_softc *b = &ifp2sc[ifp->if_index];
if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) {
printf("%s is not an ethernet, continue\n", buf);