SERVER-14806: Improve get_ipaddr parsing