diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2014-06-06 14:37:08 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2014-06-06 14:37:08 +0200 |
commit | 16a4e5460acce27012e49b4a9f33a278517c6cab (patch) | |
tree | 9e49fbf5bc0baaf9b477c6c95e29669bb5bc98da | |
parent | 12bd8cf96b2af106470bcf1711048fa9ea513016 (diff) | |
download | initscripts-16a4e5460acce27012e49b4a9f33a278517c6cab.tar initscripts-16a4e5460acce27012e49b4a9f33a278517c6cab.tar.gz initscripts-16a4e5460acce27012e49b4a9f33a278517c6cab.tar.bz2 initscripts-16a4e5460acce27012e49b4a9f33a278517c6cab.tar.xz initscripts-16a4e5460acce27012e49b4a9f33a278517c6cab.zip |
ipcalc: -c allow netmask
-rw-r--r-- | src/ipcalc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcalc.c b/src/ipcalc.c index 6a803f11..9108e4c2 100644 --- a/src/ipcalc.c +++ b/src/ipcalc.c @@ -319,8 +319,8 @@ int main(int argc, const char **argv) { } } - if (showBroadcast || showNetwork || showPrefix) { - if (!(netmaskStr = (char *) poptGetArg(optCon)) && (prefix < 0)) { + if (showBroadcast || showNetwork || showPrefix || doCheck) { + if (!(netmaskStr = (char *) poptGetArg(optCon)) && (prefix < 0 && !doCheck)) { if (!beSilent) { fprintf(stderr, "ipcalc: netmask or prefix expected\n"); poptPrintHelp(optCon, stderr, 0); |