Skip to content

Commit

Permalink
fix:use Ephemeral port
Browse files Browse the repository at this point in the history
Signed-off-by: nabil salah <[email protected]>
  • Loading branch information
Nabil-Salah committed Dec 27, 2024
1 parent 08c76e5 commit f934224
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ FROM alpine:3.19
WORKDIR /app

COPY --from=builder /src/target/x86_64-unknown-linux-musl/release/dnsserver-nabil /app/dnsserver-nabil
COPY --from=builder /src/Cargo.toml /app/Cargo.toml

# Ensure the binary is executable
RUN chmod +x /app/dnsserver-nabil
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn recursive_lookup(
}

fn lookup(qname: &str, qtype: QueryType, server: (Ipv4Addr, u16)) -> Result<DnsPacket, io::Error> {
let socket = UdpSocket::bind(("0.0.0.0", 43210))?;
let socket = UdpSocket::bind(("0.0.0.0", 49152))?;

let mut packet = DnsPacket::new();

Expand Down

0 comments on commit f934224

Please sign in to comment.