mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
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:
parent
d8f77b4529
commit
c6358a5e6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149315
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue