aboutsummaryrefslogtreecommitdiff
path: root/sbin/route
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/route.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 79ec08972738..9c9e4b304848 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1050,10 +1050,13 @@ newroute(int argc, char **argv)
}
printf("\n");
}
+ }
- fibnum = 0;
- TAILQ_FOREACH(fl, &fibl_head, fl_next) {
- if (fl->fl_error != 0) {
+ fibnum = 0;
+ TAILQ_FOREACH(fl, &fibl_head, fl_next) {
+ if (fl->fl_error != 0) {
+ error = 1;
+ if (!qflag) {
printf("%s %s %s", cmd, (nrflags & F_ISHOST)
? "host" : "net", dest);
if (*gateway)
@@ -1087,7 +1090,6 @@ newroute(int argc, char **argv)
break;
}
printf(": %s\n", errmsg);
- error = 1;
}
}
}