redone getlocalips fix more neatly