summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2014-08-29 14:03:16 +1000
committerJeremy Kerr <jk@ozlabs.org>2014-09-04 13:58:04 +0800
commit01dac4f074301097d10abb6130eb68f99f56a1b9 (patch)
tree3f3ca975a2b579918bd8d79647e00f18f37d37d6 /discover
parenta744f086e4c16d5b286cf264a16ceca2dc23d43e (diff)
downloadpetitboot-01dac4f074301097d10abb6130eb68f99f56a1b9.zip
petitboot-01dac4f074301097d10abb6130eb68f99f56a1b9.tar.gz
discover: Reject ADD_URL actions without configured network
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover')
-rw-r--r--discover/device-handler.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 2164b22..120f11f 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -923,6 +923,12 @@ void device_handler_process_url(struct device_handler *handler,
status->detail = talloc_asprintf(status,
_("Received config URL %s"), url);
+ if (!handler->network) {
+ status->message = talloc_asprintf(handler,
+ _("No network configured"));
+ goto msg;
+ }
+
event = talloc(handler, struct event);
event->type = EVENT_TYPE_USER;
event->action = EVENT_ACTION_CONF;
OpenPOWER on IntegriCloud