Update other_files/network_filter.c
Browse files- other_files/network_filter.c +0 -11
other_files/network_filter.c
CHANGED
@@ -93,13 +93,6 @@
|
|
93 |
inet_ntop(AF_INET, &(sin->sin_addr), ip_str, INET_ADDRSTRLEN);
|
94 |
|
95 |
int allowed = is_ip_allowed(ip_str);
|
96 |
-
if (!allowed) {
|
97 |
-
fprintf(stderr, "[NETWORK_FILTER] Blocked connection to %s:%d\n",
|
98 |
-
ip_str, ntohs(sin->sin_port));
|
99 |
-
} else {
|
100 |
-
fprintf(stderr, "[NETWORK_FILTER] Allowed connection to %s:%d\n",
|
101 |
-
ip_str, ntohs(sin->sin_port));
|
102 |
-
}
|
103 |
return allowed;
|
104 |
} else if (addr->sa_family == AF_INET6) {
|
105 |
struct sockaddr_in6* sin6 = (struct sockaddr_in6*)addr;
|
@@ -160,10 +153,6 @@
|
|
160 |
(type & SOCK_DGRAM) ? "UDP" : "other";
|
161 |
|
162 |
int result = original_socket(domain, type, protocol);
|
163 |
-
if (result >= 0) {
|
164 |
-
fprintf(stderr, "[NETWORK_FILTER] Created socket: %s %s (fd=%d)\n",
|
165 |
-
domain_str, type_str, result);
|
166 |
-
}
|
167 |
|
168 |
return result;
|
169 |
}
|
|
|
93 |
inet_ntop(AF_INET, &(sin->sin_addr), ip_str, INET_ADDRSTRLEN);
|
94 |
|
95 |
int allowed = is_ip_allowed(ip_str);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
return allowed;
|
97 |
} else if (addr->sa_family == AF_INET6) {
|
98 |
struct sockaddr_in6* sin6 = (struct sockaddr_in6*)addr;
|
|
|
153 |
(type & SOCK_DGRAM) ? "UDP" : "other";
|
154 |
|
155 |
int result = original_socket(domain, type, protocol);
|
|
|
|
|
|
|
|
|
156 |
|
157 |
return result;
|
158 |
}
|