mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 04:08:47 +00:00
don't try to connect to null-routed ips
This commit is contained in:
parent
11988579f5
commit
50c079d4b4
@ -472,6 +472,10 @@ int connect(int sock, const struct sockaddr *addr, unsigned int len) {
|
|||||||
v6 = dest_ip.is_v6 = 0;
|
v6 = dest_ip.is_v6 = 0;
|
||||||
p_addr_in = &v4inv6;
|
p_addr_in = &v4inv6;
|
||||||
}
|
}
|
||||||
|
if(!v6 && !memcmp(p_addr_in, "\0\0\0\0", 4)) {
|
||||||
|
errno = ECONNREFUSED;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
// PDEBUG("localnet: %s; ", inet_ntop(AF_INET,&in_addr_localnet, str, sizeof(str)));
|
// PDEBUG("localnet: %s; ", inet_ntop(AF_INET,&in_addr_localnet, str, sizeof(str)));
|
||||||
// PDEBUG("netmask: %s; " , inet_ntop(AF_INET, &in_addr_netmask, str, sizeof(str)));
|
// PDEBUG("netmask: %s; " , inet_ntop(AF_INET, &in_addr_netmask, str, sizeof(str)));
|
||||||
|
Loading…
Reference in New Issue
Block a user