summaryrefslogtreecommitdiffstats
path: root/discover/event.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-03-19 14:24:57 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-04-29 14:48:01 +1000
commit19dab336ae13f0476bfbf0db34f1329a802eeb8e (patch)
tree8af60e243d1306a909ec46f46fd9887c6641a8d6 /discover/event.c
parent5e7c90eddd7ac2e4a3b05a7a5f6e29166edfa161 (diff)
downloadtalos-petitboot-19dab336ae13f0476bfbf0db34f1329a802eeb8e.tar.gz
talos-petitboot-19dab336ae13f0476bfbf0db34f1329a802eeb8e.zip
discover: Add configuration events & DHCP handler
This change adds a new event type, EVENT_ACTION_CONF. These events supply a new configuration URL that petitiboot should download and parse. With this in place, we can receive DHCP configuration events. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/event.c')
-rw-r--r--discover/event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/discover/event.c b/discover/event.c
index 1314561..a05ce27 100644
--- a/discover/event.c
+++ b/discover/event.c
@@ -42,6 +42,8 @@ static int event_parse_ad_header(char *buf, int len, enum event_action *action,
*action = EVENT_ACTION_ADD;
else if (streq(buf, "remove"))
*action = EVENT_ACTION_REMOVE;
+ else if (streq(buf, "conf"))
+ *action = EVENT_ACTION_CONF;
else {
pb_log("%s: unknown action: %s\n", __func__, buf);
return -1;
OpenPOWER on IntegriCloud