Skip to content

Commit

Permalink
Merge pull request #594 from tsubery/master
Browse files Browse the repository at this point in the history
Fix hello-timeout argument configuration and ipv6 formatter
  • Loading branch information
robertdavidgraham authored Jul 7, 2021
2 parents 34a9d69 + a6b8bed commit 1310495
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ receive_thread(void *v)
}
if (masscan->tcp_hello_timeout) {
char foo[64];
sprintf_s(foo, sizeof(foo), "%u", masscan->tcp_connection_timeout);
sprintf_s(foo, sizeof(foo), "%u", masscan->tcp_hello_timeout);
tcpcon_set_parameter( tcpcon,
"hello-timeout",
strlen(foo),
Expand Down
6 changes: 4 additions & 2 deletions src/massip-addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@ _append_ipv6(stream_t *out, const unsigned char *ipv6)
* of 0 can be removed completely, replaced by an extra colon */
if (n == 0 && !is_ellision) {
is_ellision = 1;
while (i < 16 && ipv6[i + 2] == 0 && ipv6[i + 3] == 0)
while (i < 13 && ipv6[i + 2] == 0 && ipv6[i + 3] == 0)
i += 2;
_append_char(out, ':');

/* test for all-zero address, in which case the output
* will be "::". */
if (i == 14)
while (i == 14 && ipv6[i] == 0 && ipv6[i + 1] == 0){
i=16;
_append_char(out, ':');
}
continue;
}

Expand Down

0 comments on commit 1310495

Please sign in to comment.