Open yafyz opened 5 months ago
For the first issue, I've updated the startup code to bring the loopback interface up on Kobo devices, could you test it and see if it works? Here's an updated build
As for the second issue, I do suspect those DNS failures are due to some wonkiness with how musl's libc DNS resolver works... The quickest way to test this would be to cross-compile something like the below code using musl's compiler, running it via SSH on the device and see if it works or not (here's a compiled binary):
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
#endif
int main(void)
{
struct addrinfo *result;
struct addrinfo *res;
int error;
/* resolve the domain name into a list of addresses */
error = getaddrinfo("api.mangadex.org", NULL, NULL, &result);
if (error != 0)
{
if (error == EAI_SYSTEM)
{
perror("getaddrinfo");
}
else
{
fprintf(stderr, "error in getaddrinfo: %s\n", gai_strerror(error));
}
exit(EXIT_FAILURE);
}
/* IPv4 */
char ipv4[INET_ADDRSTRLEN];
struct sockaddr_in *addr4;
/* IPv6 */
char ipv6[INET6_ADDRSTRLEN];
struct sockaddr_in6 *addr6;
/* loop over all returned results and do inverse lookup */
for (res = result; res != NULL; res = res->ai_next)
{
if (res->ai_addr->sa_family == AF_INET)
{
addr4 = (struct sockaddr_in *)res->ai_addr;
inet_ntop(AF_INET, &addr4->sin_addr, ipv4, INET_ADDRSTRLEN);
printf("IP: %s\n", ipv4);
}
else if (res->ai_addr->sa_family == AF_INET6)
{
addr6 = (struct sockaddr_in6 *)res->ai_addr;
inet_ntop(AF_INET6, &addr6->sin6_addr, ipv6, INET6_ADDRSTRLEN);
printf("IP: %s\n", ipv6);
}
}
freeaddrinfo(result);
return 0;
}
There are currently 2 issues with Libra 2.