Correctly use ai_family for socket(2) call.