Hi,
I am proposing this small change to the UDPClient to allow it to use an ephemeral port provided by the operating system rather than randomly trying to find a source port when none are provided.
A new system parameter is created (defaults to existing behavior). If set this new system parameter is set to true, then the UDPClient will bind to port 0 (asking the underlying OS to select an ephemeral port) instead of binding to a randomly selected source port (call to org.xbill.DNS.UDPClient#bind_random).
I was not sure if the system parameter name should start with 'dnsjava...' or 'org.xbill.DNS...'. I went with 'dnsjava' since it is the name of the product.
Regards
Stéphan Dupont
Ticket moved from /p/dnsjava/patches/33/
https://github.com/dnsjava/dnsjava/pull/25