After adding IPv6 support the access list matching routine was left in
a broken state. This patch fixes the problem by continuing the support
for IPv4 address/netmask access lists.
The following problems are fixed:
* support for a server listening to both IPv6 (AF_INET6) and IPv4 (AF_INET)
address (since one can not assume that the server's address has AF_INET);
* explicit support for addresses in network-byte-order (without having to reverse
the netmask);
* a routine to extract v6-mapped IPv4 addresses ("::FFFF:x.x.x.x") for IPv4
clients connecting to a (dual-stack) IPv6 server.
When the access list is in use, the connection mode is automatically switched to
IPv4, i.e. IPv6 clients connecting to the server will be treated as if they were
in the deny-list.