X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fconf.c;h=1b0ac641fceda969305e347da768cd27eff6a6b8;hb=636200d1a2024982fe5b3062153daa72a8253015;hp=5dc7017191c6f15d857201c4aaf8ad819741a383;hpb=a9bdfb424e7a469d15156aa44bbe2fd0b8e28531;p=tinc diff --git a/src/conf.c b/src/conf.c index 5dc70171..1b0ac641 100644 --- a/src/conf.c +++ b/src/conf.c @@ -218,9 +218,9 @@ bool get_config_subnet(const config_t *cfg, subnet_t ** result) { /* Teach newbies what subnets are... */ if(((subnet.type == SUBNET_IPV4) - && !maskcheck(&subnet.net.ipv4.address, subnet.net.ipv4.prefixlength, sizeof(ipv4_t))) + && !maskcheck(&subnet.net.ipv4.address, subnet.net.ipv4.prefixlength, sizeof subnet.net.ipv4.address)) || ((subnet.type == SUBNET_IPV6) - && !maskcheck(&subnet.net.ipv6.address, subnet.net.ipv6.prefixlength, sizeof(ipv6_t)))) { + && !maskcheck(&subnet.net.ipv6.address, subnet.net.ipv6.prefixlength, sizeof subnet.net.ipv6.address))) { logger(LOG_ERR, _ ("Network address and prefix length do not match for configuration variable %s in %s line %d"), cfg->variable, cfg->file, cfg->line); return false;