]> git.ipfire.org Git - people/ms/dma.git/blobdiff - conf.c
Add NULLCLIENT support
[people/ms/dma.git] / conf.c
diff --git a/conf.c b/conf.c
index 6e4eb2511b4c26205359e00981bfb3c67c82fd09..919ab7c4d77ebad6c9014ac5392301a2c5bcdd27 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -229,11 +229,18 @@ parse_conf(const char *config_path)
                        config.features |= INSECURE;
                else if (strcmp(word, "FULLBOUNCE") == 0 && data == NULL)
                        config.features |= FULLBOUNCE;
+               else if (strcmp(word, "NULLCLIENT") == 0 && data == NULL)
+                       config.features |= NULLCLIENT;
                else {
                        errlogx(1, "syntax error in %s:%d", config_path, lineno);
                        /* NOTREACHED */
                }
        }
 
+       if ((config.features & NULLCLIENT) && config.smarthost == NULL) {
+               errlogx(1, "%s: NULLCLIENT requires SMARTHOST", config_path);
+               /* NOTREACHED */
+       }
+
        fclose(conf);
 }