[hostname] Fix format when DEFAULTGW is not detected