From 382c2928d9308a9c6ec1b38aae8af969c80874a1 Mon Sep 17 00:00:00 2001 From: "Peter H. Jin" Date: Sat, 10 Sep 2022 23:19:21 -0400 Subject: [PATCH] Fix IPv4 bind profiles not working --- socket-enhancer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socket-enhancer.c b/socket-enhancer.c index d99aa49..2989622 100644 --- a/socket-enhancer.c +++ b/socket-enhancer.c @@ -145,7 +145,7 @@ static int get_idx_by_address(const struct sockaddr *addr, socklen_t len) { return -1; ipv4: if ((ipv4_address & 0xffffc000U) == 0x7fa74000U) { - return 0x4000U | (ipv4_address & 0x4000U); + return 0x4000U | (ipv4_address & 0x3fffU); } else if ((ipv4_address & 0xff000000U) == 0x7f000000U) { return 41; } else {