Skip to content

Commit

Permalink
Fix a naming typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Dec 7, 2023
1 parent e569965 commit 8166c46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions edge-dhcp/src/io/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ where

let mut opt_buf = Options::buf();

if let Some(request) =
if let Some(reply) =
self.server
.handle_request(&mut opt_buf, &self.server_options, &request)
{
let remote = if let SocketAddr::V4(socket) = remote {
if request.broadcast || *socket.ip() == Ipv4Addr::UNSPECIFIED {
SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::BROADCAST, remote.port()))
SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::BROADCAST, socket.port()))
} else {
remote
}
Expand All @@ -129,7 +129,7 @@ where
};

socket
.send(local, remote, request.encode(self.buf)?)
.send(local, remote, reply.encode(self.buf)?)
.await
.map_err(Error::Io)?;
}
Expand Down

0 comments on commit 8166c46

Please sign in to comment.