aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-06-06 14:37:08 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-09-09 14:35:09 +0200
commit3137737948ea40b3c7b69ea1f35199749e78b870 (patch)
tree70c3e097281d6562cbbd8a2feebb99551517a35c /src
parent821dfcde7d027a566c5af861ee3f127070e933cd (diff)
downloadinitscripts-3137737948ea40b3c7b69ea1f35199749e78b870.tar
initscripts-3137737948ea40b3c7b69ea1f35199749e78b870.tar.gz
initscripts-3137737948ea40b3c7b69ea1f35199749e78b870.tar.bz2
initscripts-3137737948ea40b3c7b69ea1f35199749e78b870.tar.xz
initscripts-3137737948ea40b3c7b69ea1f35199749e78b870.zip
ipcalc: -c allow netmask
Diffstat (limited to 'src')
-rw-r--r--src/ipcalc.c4
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);