Don't print usbus[0-9] interfaces that it's not the interesting

interface type for ifconfig(8).
This commit is contained in:
Weongyo Jeong 2010-12-01 03:24:38 +00:00
parent 06e794928b
commit 6d2f981e9b

View File

@ -295,6 +295,8 @@ main(int argc, char *argv[])
sdl = (const struct sockaddr_dl *) ifa->ifa_addr;
else
sdl = NULL;
if (sdl != NULL && sdl->sdl_type == IFT_USB)
continue;
if (cp != NULL && strcmp(cp, ifa->ifa_name) == 0 && !namesonly)
continue;
iflen = strlcpy(name, ifa->ifa_name, sizeof(name));