diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-02-10 00:18:54 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-02-10 00:18:54 +0100 |
commit | c72ecdba04e7e9c3a411daaeb6fabab85314f82a (patch) | |
tree | b2da84878e80c7ce83fc318a2ce70ddbcf73fcfb | |
parent | 0.0.3 (diff) | |
download | dnsfind-master.tar dnsfind-master.tar.gz dnsfind-master.tar.bz2 dnsfind-master.tar.lz dnsfind-master.tar.xz dnsfind-master.tar.zst dnsfind-master.zip |
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | host.c | 2 | ||||
-rw-r--r-- | main.c | 6 |
3 files changed, 11 insertions, 3 deletions
@@ -49,4 +49,10 @@ avtomatska gradnja izvršilnih datotek in programskih paketov za štiri arhitekt http://armel.sijanec.eu/prog/dnsfind i386 pa gradi moj osebni prenosni računalnik, ki ni vedno povezan v Internet. +možne napake: + EINVAL na sendto(2): verjetno je bil paket poslan na lokalno mrežo, vendar je ARP tabela + polna. povečajte arp tabelo ali pošljite vse pakete na gateway. + https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt + sysctl -a | grep -i ipv4.*default.gc.thresh + -- Anton Luka Šijanec <anton@sijanec.eu> Tue, 19 Jan 2022 14:30:00 +0200 @@ -47,6 +47,8 @@ int resolve (const char * d, uint32_t * r) { }; struct addrinfo * result; int ret = getaddrinfo(d, NULL, &hints, &result); + if (ret) + return ret; *r = ((struct sockaddr_in *) result->ai_addr)->sin_addr.s_addr; /* ah yes, C */ freeaddrinfo(result); return ret; @@ -583,11 +583,11 @@ finished_sending: r = 17; goto r; } - if (sendto(s, u, L, 0, (struct sockaddr *) &m, sizeof(struct sockaddr)) == -1) { - perror("sendto(s,u, L, 0, (struct sockaddr *) &m, sizeof(struct sockaddr))"); + if (sendto(s, u, L, 0, (struct sockaddr *) &m, sizeof(struct sockaddr_in)) == -1) { + perror("sendto(s, u, L, 0, (struct sockaddr *) &m, sizeof(struct sockad..."); r = 18; goto r; - } + } /* https://stevecao.wordpress.com/2018/09/28/diagnosing-invalid-argument-error */ struct timespec z; i: if (clock_gettime(CLOCK_MONOTONIC, &z) == -1) { |