diff --git a/binaries/aarch64/nfqws b/binaries/aarch64/nfqws index 4ba05ad..b3c7ca8 100755 Binary files a/binaries/aarch64/nfqws and b/binaries/aarch64/nfqws differ diff --git a/binaries/arm/nfqws b/binaries/arm/nfqws index 6eac78f..9f7d93f 100755 Binary files a/binaries/arm/nfqws and b/binaries/arm/nfqws differ diff --git a/binaries/mips32r1-lsb/nfqws b/binaries/mips32r1-lsb/nfqws index 97cfc59..a0f59cd 100755 Binary files a/binaries/mips32r1-lsb/nfqws and b/binaries/mips32r1-lsb/nfqws differ diff --git a/binaries/mips32r1-msb/nfqws b/binaries/mips32r1-msb/nfqws index a2a7070..c03e726 100755 Binary files a/binaries/mips32r1-msb/nfqws and b/binaries/mips32r1-msb/nfqws differ diff --git a/binaries/mips64r2-msb/nfqws b/binaries/mips64r2-msb/nfqws index be326ea..f64dcf3 100755 Binary files a/binaries/mips64r2-msb/nfqws and b/binaries/mips64r2-msb/nfqws differ diff --git a/binaries/ppc/nfqws b/binaries/ppc/nfqws index 675fd7e..1f2e9f4 100755 Binary files a/binaries/ppc/nfqws and b/binaries/ppc/nfqws differ diff --git a/binaries/x86/nfqws b/binaries/x86/nfqws index 8f13fd9..9a7a475 100755 Binary files a/binaries/x86/nfqws and b/binaries/x86/nfqws differ diff --git a/binaries/x86_64/nfqws b/binaries/x86_64/nfqws index 19dbddf..df04259 100755 Binary files a/binaries/x86_64/nfqws and b/binaries/x86_64/nfqws differ diff --git a/nfq/darkmagic.c b/nfq/darkmagic.c index 03fa01f..425cc5c 100644 --- a/nfq/darkmagic.c +++ b/nfq/darkmagic.c @@ -885,7 +885,7 @@ static int rawsend_socket_divert(sa_family_t family) // from my point of view disabling direct ability to send ip frames is not security. its SHIT int fd = socket(family, SOCK_RAW, IPPROTO_DIVERT); - if (!set_socket_buffers(fd,4096,RAW_SNDBUF)) + if (fd!=-1 && !set_socket_buffers(fd,4096,RAW_SNDBUF)) { close(fd); return -1; @@ -1026,10 +1026,12 @@ bool rawsend_preinit(bool bind_fix4, bool bind_fix6) { b_bind_fix4 = bind_fix4; b_bind_fix6 = bind_fix6; - return rawsend_socket(AF_INET)!=-1 && rawsend_socket(AF_INET6)!=-1; + // allow ipv6 disabled systems + return rawsend_socket(AF_INET)!=-1 && (rawsend_socket(AF_INET6)!=-1 || errno==EAFNOSUPPORT); } bool rawsend(const struct sockaddr* dst,uint32_t fwmark,const char *ifout,const void *data,size_t len) { + ssize_t bytes; int sock=rawsend_socket(dst->sa_family); if (sock==-1) return false; if (!set_socket_fwmark(sock,fwmark)) return false; @@ -1121,7 +1123,7 @@ nofix: #endif // normal raw socket sendto - ssize_t bytes = sendto(sock, data, len, 0, (struct sockaddr*)&dst2, salen); + bytes = sendto(sock, data, len, 0, (struct sockaddr*)&dst2, salen); #if defined(__FreeBSD) && __FreeBSD__<=10 // restore byte order if (dst->sa_family==AF_INET && len>=sizeof(struct ip))