summaryrefslogtreecommitdiff
path: root/usr.sbin/ifstated
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2006-03-16 06:17:43 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2006-03-16 06:17:43 +0000
commitbbff63dc3ec0299de31cce930f3cf8e578e587b8 (patch)
tree46f9ed9c5d275c577ce51fc72fb5eaa9413d574e /usr.sbin/ifstated
parent077bd7e5a252873ae1f3555593136dc42ea9872a (diff)
Error out of ifstate.conf parsing instead of dumping core in operation
when a undefined ruleset is referenced. Fixes PR5049. Report and troubleshooting from Michael Knudsen.
Diffstat (limited to 'usr.sbin/ifstated')
-rw-r--r--usr.sbin/ifstated/parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y
index d5097200a20..ce11264f93f 100644
--- a/usr.sbin/ifstated/parse.y
+++ b/usr.sbin/ifstated/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.11 2006/01/20 00:01:20 millert Exp $ */
+/* $OpenBSD: parse.y,v 1.12 2006/03/16 06:17:42 mcbride Exp $ */
/*
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
@@ -700,6 +700,11 @@ link_states(struct ifsd_action *action)
break;
}
}
+ if (state == NULL) {
+ fprintf(stderr, "error: state '%s' not declared\n",
+ action->act.statename);
+ errors++;
+ }
break;
}
case IFSD_ACTION_CONDITION: