From: Mark Wooding Date: Sat, 3 May 2014 14:35:29 +0000 (+0100) Subject: src/setup.c: Check netmask more carefully. X-Git-Tag: wip.base.getaddrinfo~30 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/commitdiff_plain/67dcc3b16a3fbae06404b07cb1d7980d02a20175?hp=67dcc3b16a3fbae06404b07cb1d7980d02a20175 src/setup.c: Check netmask more carefully. [crybaby ~/src/adns/build]RES_CONF_TEXT="sortlist 172.29.199.1/24" RES_OPTIONS="adns_checkc:entex" adnshost -ta www-cache.distorted.org.uk adnshost: ../src/check.c:83: checkc_global: Assertion `!(ads->sortlist[i].base.s_addr & ~ads->sortlist[i].mask.s_addr)' failed. Aborted Unfortunately, `ccf_sortlist' only checked that the free bits of the network address are clear when given a general netmask, so if you give a prefix length or leave it implicit then you hit a consistency check failure later. Check the mask later on, after all of the variants are handled. There's a little bit of variation in the message. Signed-off-by: Mark Wooding ---