pick an address on the same subnet. if non are found, give up and try them in order This commit was SVN r7426.
This commit was SVN r6321.
This commit was SVN r6266.