When destination parameter is missing, exit with a clear synopsis,
instead of writing to kernel and printing EINVAL description. PR: bin/181532 Submitted by: Kurt Jaeger <fbsd-pr opsec.eu> Approved by: re (hrs)
This commit is contained in:
parent
e590690fad
commit
3bf351b29a
@ -928,6 +928,11 @@ newroute(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (so[RTAX_DST].ss_len == 0) {
|
||||
warnx("destination parameter required");
|
||||
usage(NULL);
|
||||
}
|
||||
|
||||
if (nrflags & F_FORCEHOST) {
|
||||
nrflags |= F_ISHOST;
|
||||
#ifdef INET6
|
||||
|
Loading…
x
Reference in New Issue
Block a user