FwdServer *fs = servers;
assert(fs);
- // some callers use one condition, some use the other; are they the same?
- assert((fs->code == HIER_DIRECT) == !fs->_peer);
-
const char *nextHop = NULL;
- if (fs->_peer) {
+ if (fs->_peer) {
// went to peer, log peer host name
nextHop = fs->_peer->name;
} else {
nextHop = fd_table[server_fd].ipaddr;
if (!Config.onoff.log_ip_on_direct || !nextHop[0])
nextHop = request->host; // domain name
- }
+ }
assert(nextHop);
hierarchyNote(&request->hier, fs->code, nextHop);