Skip to content

Commit

Permalink
test-resolved-stream: Use a random port number
Browse files Browse the repository at this point in the history
Hopefully fixes #28393
  • Loading branch information
DaanDeMeyer committed Jul 18, 2023
1 parent cc037f2 commit 106fcf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolve/test-resolved-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "macro.h"
#include "path-util.h"
#include "process-util.h"
#include "random-util.h"
#include "resolved-dns-packet.h"
#include "resolved-dns-question.h"
#include "resolved-dns-rr.h"
Expand Down Expand Up @@ -374,7 +375,7 @@ static void try_isolate_network(void) {
int main(int argc, char **argv) {
server_address = (union sockaddr_union) {
.in.sin_family = AF_INET,
.in.sin_port = htobe16(12345),
.in.sin_port = htobe16(random_u64_range(UINT16_MAX - 1024) + 1024),
.in.sin_addr.s_addr = htobe32(INADDR_LOOPBACK)
};

Expand Down

0 comments on commit 106fcf0

Please sign in to comment.