diff options
Diffstat (limited to 'ipsvd/tcpsvd.c')
-rw-r--r-- | ipsvd/tcpsvd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipsvd/tcpsvd.c b/ipsvd/tcpsvd.c index 197edca4e..98234a78b 100644 --- a/ipsvd/tcpsvd.c +++ b/ipsvd/tcpsvd.c | |||
@@ -128,8 +128,8 @@ int tcpsvd_main(int argc, char **argv) | |||
128 | uint16_t remote_port; | 128 | uint16_t remote_port; |
129 | char *local_hostname = NULL; | 129 | char *local_hostname = NULL; |
130 | char *remote_hostname = (char*)""; /* "" used if no -h */ | 130 | char *remote_hostname = (char*)""; /* "" used if no -h */ |
131 | char *local_ip = local_ip; | 131 | char *local_ip = local_ip; /* gcc */ |
132 | char *remote_ip = NULL; | 132 | char *remote_ip = remote_ip; /* gcc */ |
133 | //unsigned iscdb = 0; /* = option_mask32 & OPT_x (TODO) */ | 133 | //unsigned iscdb = 0; /* = option_mask32 & OPT_x (TODO) */ |
134 | //unsigned long timeout = 0; | 134 | //unsigned long timeout = 0; |
135 | #ifndef SSLSVD | 135 | #ifndef SSLSVD |
@@ -271,10 +271,10 @@ int tcpsvd_main(int argc, char **argv) | |||
271 | if (max_per_host) { | 271 | if (max_per_host) { |
272 | /* we drop connection immediately if cur_per_host > max_per_host | 272 | /* we drop connection immediately if cur_per_host > max_per_host |
273 | * (minimizing load under SYN flood) */ | 273 | * (minimizing load under SYN flood) */ |
274 | free(remote_ip); | ||
275 | remote_ip = xmalloc_sockaddr2dotted_noport(&sock_adr.sa, sockadr_size); | 274 | remote_ip = xmalloc_sockaddr2dotted_noport(&sock_adr.sa, sockadr_size); |
276 | cur_per_host = ipsvd_perhost_add(remote_ip, max_per_host, &hccp); | 275 | cur_per_host = ipsvd_perhost_add(remote_ip, max_per_host, &hccp); |
277 | if (cur_per_host > max_per_host) { | 276 | if (cur_per_host > max_per_host) { |
277 | free(remote_ip); | ||
278 | /* ipsvd_perhost_add detected that max is exceeded | 278 | /* ipsvd_perhost_add detected that max is exceeded |
279 | * (and did not store us in connection table) */ | 279 | * (and did not store us in connection table) */ |
280 | if (msg_per_host) { | 280 | if (msg_per_host) { |