Permalink
Browse files

Allow broadcast packets in dhcpd

  • Loading branch information...
jackpot51 committed Oct 30, 2017
1 parent 2c082a3 commit a719fa50b065840ffacc81d989e47f258b3e5170
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/dhcpd/main.rs
@@ -30,8 +30,8 @@ fn dhcp(quiet: bool) -> Result<(), String> {
let tid = try_fmt!(time::SystemTime::now().duration_since(time::UNIX_EPOCH), "failed to get time").subsec_nanos();
let socket = try_fmt!(UdpSocket::bind((current_ip.trim(), 68)), "failed to bind udp");
try_fmt!(socket.connect("255.255.255.255:67"), "failed to connect udp");
let socket = try_fmt!(UdpSocket::bind(("0.0.0.0", 68)), "failed to bind udp");
try_fmt!(socket.connect(("255.255.255.255", 67)), "failed to connect udp");
try_fmt!(socket.set_read_timeout(Some(Duration::new(5, 0))), "failed to set read timeout");
try_fmt!(socket.set_write_timeout(Some(Duration::new(5, 0))), "failed to set write timeout");

0 comments on commit a719fa5

Please sign in to comment.