require e-mail address if dns is enabled

Writing SOA record will cause nullptr dereference if it's not specified.
This commit is contained in:
Pavel Vasin 2015-08-03 22:04:20 +03:00
parent a59329d936
commit f0c8b87a07

View file

@ -421,6 +421,10 @@ int main(int argc, char **argv) {
fprintf(stderr, "No hostname set. Please use -h.\n");
exit(1);
}
if (fDNS && !opts.mbox) {
fprintf(stderr, "No e-mail address set. Please use -m.\n");
exit(1);
}
FILE *f = fopen("dnsseed.dat","r");
if (f) {
printf("Loading dnsseed.dat...");