DatagramSocket constructed with the default constructor is IPV4 by default.
when bind(sa) is called on such a socket, even if the socket address is IPV6, the socket fails to bind.
a stupid workaround is to close() the socket before binding, but a better solution is to properly handle this by switching the underlying socket type to ipv6.