Bail if interface is misspelled instead of falling out into the

"all interfaces" mode.  (Only works with -w, but still better
than nothing.)
This commit is contained in:
Ruslan Ermilov 2005-08-20 08:34:21 +00:00
parent d8f77b4529
commit c6358a5e6f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149315

View File

@ -608,6 +608,8 @@ sidewaysintpr(unsigned interval1, u_long off)
ip = ipn;
off = (u_long)TAILQ_NEXT(&ifnet, if_link);
}
if (interface && interesting == NULL)
errx(1, "%s: unknown interface", interface);
if ((total = malloc(sizeof(struct iftot))) == NULL) {
printf("malloc failed\n");
exit(1);