Cleanup and adapt our blocklist client with the fallbacks currently on
NetBSD's pfilter.c implementation:
- If blstate is NULL, it tries to initialize it with blocklist_init(),
which in turn uses bl_create() instead of blocklist_open(), given we
want to use our custom logging function. If it is still NULL, it
means it failed to create the necessary state to communicate with
blocklistd(8), and returns.
It is worth noting that we have blocklist_open2() on CURRENT, which
allows us to use our custom logging function without using the
internal bl_create() function, but we want to MFC these changes to
branches which do not have blocklist_open2().
- To determine the file descriptor passed to blocklist_r(), if the ssh
struct is not NULL, it passes it to
ssh_packet_connection_is_on_socket(), which determines if the remote
host is connected via a socket, if it is, it passes the ssh struct to
ssh_packet_get_connection_in() to get the socket used for reading, if
it isn't, it sets the file descriptor to 3.
- Finally, if the action received is BLOCKLIST_AUTH_OK (0), call
blocklist_close() to free resources and reset blstate.
Clean up code spaces and fix a typo: impedance.