ObjFW  Check-in [42acd2b94a]

Overview
Comment:Correctly handle KAME's embedded scope ID
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 42acd2b94ad8463346947cc14c0cec3e0e83f7ae258e0a4d6c785dfece0692c1
User & Date: js on 2023-08-26 22:02:51
Other Links: manifest | tags
Context
2023-08-27
09:23
Fix hanging blocking TLS connections with OpenSSL check-in: 38e105d056 user: js tags: trunk
2023-08-26
22:02
Correctly handle KAME's embedded scope ID check-in: 42acd2b94a user: js tags: trunk
19:02
configure: Change TLS default to OpenSSL check-in: 121e9fddd2 user: js tags: trunk
Changes

Modified configure.ac from [531e3d2d23] to [4cc58b9994].

1451
1452
1453
1454
1455
1456
1457


1458
1459
1460
1461
1462
1463
1464
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466







+
+







			#endif

			#ifdef AF_INET6
			egrep_cpp_yes
			#endif
		], [
			AC_DEFINE(OF_HAVE_IPV6, 1, [Whether we have IPv6])

			AC_CHECK_FUNCS(inet6_getscopeid)
		])
	], [
		dnl Work around a bug in autoconf 2.61 that creates a broken
		dnl configure if this branch is empty.
		:
	], [
		#ifdef _WIN32

Modified src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m from [7433d01bcf] to [f03657380d].

222
223
224
225
226
227
228
229





230
231
232


233
234
235
236
237
238
239
222
223
224
225
226
227
228

229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245







-
+
+
+
+
+



+
+







			memcpy(&address.sockaddr.in, &current->ifr_addr,
			    sockaddrSize);

#  if defined(OF_HAVE_IPV6) && defined(HAVE_IF_NAMETOINDEX)
			if (address.sockaddr.in6.sin6_family == AF_INET6 &&
			    address.sockaddr.in6.sin6_addr.s6_addr[0] == 0xFE &&
			    (address.sockaddr.in6.sin6_addr.s6_addr[1] & 0xC0)
			    == 0x80)
			    == 0x80) {
#   if defined(HAVE_INET6_GETSCOPEID)
				inet6_getscopeid(&address.sockaddr.in6,
				    INET6_IS_ADDR_LINKLOCAL);
#   elif defined(HAVE_IF_NAMETOINDEX)
				address.sockaddr.in6.sin6_scope_id =
				    if_nametoindex(
				    [name cStringWithEncoding: encoding]);
#   endif
			}
#  endif

			[addresses addItem: &address];

next:
# ifdef _SIZEOF_ADDR_IFREQ
			buffer += _SIZEOF_ADDR_IFREQ(*current);