Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update client.c
  • Loading branch information
ihsinme committed Jun 5, 2022
1 parent d5e32d9 commit 9acc42d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.c
Expand Up @@ -295,8 +295,8 @@ void selectTunnel(SSL* ssl, int sockfd, int tunfd) {

//获取服务端分配的虚拟IP
int recvVirtualIP(SSL* ssl) {
char buf[10];
SSL_read(ssl,buf,BUFF_SIZE);
char buf[10] = {0};
SSL_read(ssl,buf,9);
int virtualIP = atoi(buf);
printf("virtualIP: 192.168.53.%d/24\n",virtualIP);
return virtualIP;
Expand Down Expand Up @@ -350,4 +350,4 @@ int main(int argc, char *argv[]) {
SSL_free(ssl);
close(sockfd);
return 0;
}
}

0 comments on commit 9acc42d

Please sign in to comment.