Commit 2577ed7a authored by nanamicat's avatar nanamicat

docker

parent 5ecb79c3
Pipeline #42040 failed with stages
in 3 minutes and 47 seconds
...@@ -286,8 +286,7 @@ impl Router { ...@@ -286,8 +286,7 @@ impl Router {
let mut name_bytes = config.dev.as_bytes().to_vec(); let mut name_bytes = config.dev.as_bytes().to_vec();
name_bytes.push(0); name_bytes.push(0);
libc::strncpy(ifr.ifr_name.as_mut_ptr(), name_bytes.as_ptr() as *const i8, 16); libc::strncpy(ifr.ifr_name.as_mut_ptr(), name_bytes.as_ptr() as *const libc::c_char, 16);
let res = libc::ioctl(fd, 0x400454ca, &ifr); // TUNSETIFF 的编码 let res = libc::ioctl(fd, 0x400454ca, &ifr); // TUNSETIFF 的编码
println!("{}", res); println!("{}", res);
if res < 0 { if res < 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment