Skip to content

Commit f336de2

Browse files
dhcpd::configure: set subnet mask via SIOCSIFNETMASK
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent ac3154e commit f336de2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,9 @@ fn configure(interface: &str, ip: Ipv4Addr, subnet_mask: Ipv4Addr) -> io::Result
473473
let subnet_mask = IfReq::new(interface).set_addr(subnet_mask);
474474

475475
// Set the subnet mask.
476-
// unsafe {
477-
// cvt(libc::ioctl(fd, libc::SIOCSIFNETMASK, &subnet_mask))?;
478-
// }
476+
unsafe {
477+
cvt(libc::ioctl(fd, libc::SIOCSIFNETMASK, &subnet_mask))?;
478+
}
479479

480480
Ok(())
481481
}

0 commit comments

Comments
 (0)