in function ngx_resolver_copy ,n = (n & 0x3f << 8) + *p; should be n = ((n & 0x3f) << 8) + *p;otherwis ,& oprator will not work correctlly. thanks