[network] set hostname to 127.0.0.1 if hostname is empty

Signed-off-by: Fuang.Cao <cavan.cfa@gmail.com>