summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-11-05 12:31:54 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-11-05 12:31:54 +0000
commitb82e34543bd6953a8d3579a26e007077b139f3a4 (patch)
treef87b42e6fb8155ebe79e11e48badebee5679d311
parentbdc38fc281dfae7c2d4eee86687808dee46f81f6 (diff)
parentbf4188987042001c00764e99694928df6d78ab9a (diff)
downloadplatform_external_android-clat-android10-mainline-networking-release.tar.gz
platform_external_android-clat-android10-mainline-networking-release.tar.bz2
platform_external_android-clat-android10-mainline-networking-release.zip
Snap for 5988121 from bf4188987042001c00764e99694928df6d78ab9a to qt-aml-networking-releaseandroid-mainline-10.0.0_r6android10-mainline-networking-release
Change-Id: I6fc1f29d55718330482722b2cea7560d40eb0961
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index f84a61f..c370770 100644
--- a/config.c
+++ b/config.c
@@ -234,7 +234,7 @@ int connect_is_ipv4_address_free(in_addr_t addr) {
// Attempt to connect to the address. If the connection succeeds and getsockname returns the same
// the address then the address is already assigned to the system and we can't use it.
- struct sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = { addr }, .sin_port = 53 };
+ struct sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = { addr }, .sin_port = htons(53) };
socklen_t len = sizeof(sin);
int inuse = connect(s, (struct sockaddr *)&sin, sizeof(sin)) == 0 &&
getsockname(s, (struct sockaddr *)&sin, &len) == 0 && (size_t)len >= sizeof(sin) &&