Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic DNS support #1211

Merged
merged 7 commits into from
May 22, 2024
Merged

add basic DNS support #1211

merged 7 commits into from
May 22, 2024

Conversation

stlankes
Copy link
Contributor

  • add functions to create DNS request

};

let name = unsafe { core::ffi::CStr::from_ptr(name) };
let name = name.to_str().expect("Bad encoding").to_owned();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if returning an error in case of an error is the better approach. I can imagine a scenario, where this can be abused by user input to crash the application.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See last commit

src/syscalls/socket.rs Outdated Show resolved Hide resolved
/// };
///
/// // retake pointer to free memory
/// let _ = CString::from_raw(name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// let _ = CString::from_raw(name);
/// drop(name);
/// println!("IP addr is {}", inaddr);

a missing feature is a miss-configuration => it is an error
@stlankes stlankes enabled auto-merge May 22, 2024 16:50
@stlankes stlankes added this pull request to the merge queue May 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2024
@stlankes stlankes added this pull request to the merge queue May 22, 2024
Merged via the queue into hermit-os:main with commit 7614614 May 22, 2024
13 checks passed
@stlankes stlankes deleted the dns branch May 22, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants