mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Reference in a new issue