Add IP banning capability Txrudp already has some basic banning functionality in that you can opt not to call connection.unregister() after closing a connection and it will ignore future packets from that connection. However, this only bans a ip/port tuple and not all ports on a given IP address.
Add IP banning capability
Txrudp already has some basic banning functionality in that you can opt not
to call connection.unregister() after closing a connection and it will ignore
future packets from that connection. However, this only bans a ip/port tuple
and not all ports on a given IP address.

This commit adds the ability to ban just IP addresses. When banned, packets
from that IP address will be dropped and new connections will not be made.

To prevent IP spoofing we need to test the IP address in both the IP packet
header and rudp packet header against the ban list.

OpenBazaar/txrudp,Renelvon/txrudp