Skip to content

Commit

Permalink
DNS fails without bind?
Browse files Browse the repository at this point in the history
  • Loading branch information
tinspin committed Apr 18, 2022
1 parent 15091d0 commit b4c10b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/se/rupy/http/Daemon.java
Expand Up @@ -1056,7 +1056,11 @@ public void run() {
try {
byte[] data = new byte[512];
DatagramPacket packet = new DatagramPacket(data, data.length);
dns_socket = new DatagramSocket(53);

if(bind == null)
dns_socket = new DatagramSocket(53);
else
dns_socket = new DatagramSocket(new InetSocketAddress(bind, 53));

while(true) {
dns_socket.receive(packet);
Expand Down

0 comments on commit b4c10b8

Please sign in to comment.