You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting TTL for socket in setttl function, passed socket family is not the same as in used socket. Somehow Linux don't give any errors for this and even sets TTL correctly, but while i tested on NetBSD in #75 it gives error:
setsockopt IP_TTL: Protocol option not available (A bad option or level was specified in a getsockopt(2) or setsockopt(2) call.)
And when running with ./ciadpi -p 8080 -g 1 even on Linux, it prints after connecting to any domain:
PASSED:ipv4
DETECTED:ipv6
Using my socket_family to detect socket family makes setting TTL correct without any error in NetBSD, however somehow it breaks setting TTL on Linux. So i think this problem is something bigger and not good to fix with workaround for NetBSD i did in 87e368f .
The text was updated successfully, but these errors were encountered:
The socket can be with the AF_INET6 domain, but use an IPv4-mapped address when connecting. When setting TTL in Linux, you need to look at the type of address, not the socket. In NetBSD it seems to be the other way around.
When setting TTL for socket in
setttl
function, passed socket family is not the same as in used socket. Somehow Linux don't give any errors for this and even sets TTL correctly, but while i tested on NetBSD in #75 it gives error:Simple patch for main branch to test:
And when running with
./ciadpi -p 8080 -g 1
even on Linux, it prints after connecting to any domain:Using my
socket_family
to detect socket family makes setting TTL correct without any error in NetBSD, however somehow it breaks setting TTL on Linux. So i think this problem is something bigger and not good to fix with workaround for NetBSD i did in 87e368f .The text was updated successfully, but these errors were encountered: