You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks related to how OsStr is parsed on windows 🤔 will give it a shot!
Please feel free to open a PR if you like to and count on me for all the help I can bring!
I tried to use CStr :: from_bytes_with_nul to solve this problem, in file src/linux.rs, In line 238 and line 308:
let ifname = CStr::from_bytes_with_nul(rtattr.payload().as_ref()).map_err(|_| {Error::StrategyError(String::from("An error occurred convert interface name to string",))})?
.to_string_lossy().to_string();
if_indexes.insert(p.ifi_index, ifname)
But I'm not sure if the change here will affect other places
Environment
$ uname -a Linux bitcapybara 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 GNU/Linux
Code
Expected output
Actual output
Conclusion
As shown above, the network interface name in all output has an extra "\0". Is this normal? And how can I solve it?
The text was updated successfully, but these errors were encountered: