Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - DerJens

#1
To whom it may concern:

In Services > Unbound DNS > Overrides I tried to create a Host Override Alias for 0.xxx.pool.ntp.org. This is not possible, since "0" will be detected as an empty value an will be replaced by some other value.

I created two modifications to enable such hostnames by adding is_numeric().
See https://www.php.net/manual/en/function.empty.php#103756 for reference.

unbound.inc, line 605 (Creates a valid host_entries.conf)
'host' => !empty($alias['host']) || is_numeric($alias['host']) ? $alias['host'] : $aliases[0]['host'],

services_unbound_overrides.php, line 189 ("Cosmetic" change for browser display)
<td><?= strtolower(!empty($alias['host']) || is_numeric($alias['host']) ? $alias['host'] : $hostent['host']) ?></td>