aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/command_line
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-02-22 18:09:48 +0100
committerMauro Sardara <msardara@cisco.com>2019-02-22 17:32:52 +0000
commitbb428fc90f2623bdf35c53e62bf2aaeba2d1e0b7 (patch)
tree2994228aff181f0e8adde36a77f0b2287d13cbc2 /hicn-light/src/command_line
parentfccece7f012c209f04d9f9be4a10073536091914 (diff)
[HICN-83] Added cmake flag "-DENABLE_PUNTING=[ON|OFF]" for enabling/disabling punting in hicnLightDaemon.
Change-Id: I14f5e1ce21f2c2381359fa6184671d3cbe43b808 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-light/src/command_line')
-rw-r--r--hicn-light/src/command_line/daemon/hicnLightDaemon_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
index ce8c373ca..9a6c352fb 100644
--- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
+++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
@@ -365,6 +365,13 @@ int main(int argc, const char *argv[]) {
// this will update the clock to the tick clock
Forwarder *forwarder = forwarder_Create(logger);
+ if (forwarder == NULL) {
+ logger_Log(logger, LoggerFacility_Core, PARCLogLevel_Error, "daemon",
+ "Forwarder initialization failed. Are you running it with sudo "
+ "privileges?");
+ return -1;
+ }
+
Configuration *configuration = forwarder_GetConfiguration(forwarder);
if (capacity > -1) {