fixed ip_init

Fixed ip_init not setting ip family when IP is NULL