PUD: check that smart gateway is active when checking configuration
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 16 Jan 2012 09:05:31 +0000 (10:05 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 16 Jan 2012 09:58:03 +0000 (10:58 +0100)
we depend on it

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/configuration.c

index 349c9e1..e188951 100644 (file)
@@ -2034,6 +2034,11 @@ int setUseLoopback(const char *value, void *data __attribute__ ((unused)),
 unsigned int checkConfig(void) {
        int retval = true;
 
+       if (!olsr_cnf->smart_gw_active) {
+               pudError(false, "Smart Gateway must be active");
+               retval = false;
+       }
+
        if (rxNonOlsrInterfaceCount == 0) {
                pudError(false, "No receive non-OLSR interfaces configured");
                retval = false;