-
Notifications
You must be signed in to change notification settings - Fork 87
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
add basic DNS support #1211
Conversation
stlankes
commented
May 20, 2024
- add functions to create DNS request
dda4731
to
538c7a0
Compare
6e52f12
to
a9a2f96
Compare
src/syscalls/socket.rs
Outdated
}; | ||
|
||
let name = unsafe { core::ffi::CStr::from_ptr(name) }; | ||
let name = name.to_str().expect("Bad encoding").to_owned(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See last commit
/// }; | ||
/// | ||
/// // retake pointer to free memory | ||
/// let _ = CString::from_raw(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// let _ = CString::from_raw(name); | |
/// drop(name); | |
/// println!("IP addr is {}", inaddr); |
a missing feature is a miss-configuration => it is an error