1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
From: =?utf-8?b?SmFuIE1vasW+w63FoQ==?= <jan.mojzis@gmail.com>
Date: Thu, 30 Dec 2021 07:52:05 +0100
Subject: fix socket_bind
Forwarded: no
---
curvecp/socket_bind.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/curvecp/socket_bind.c b/curvecp/socket_bind.c
index 9e36925..374b93a 100644
--- a/curvecp/socket_bind.c
+++ b/curvecp/socket_bind.c
@@ -9,6 +9,7 @@ int socket_bind(int fd,const unsigned char *ip,const unsigned char *port)
{
struct sockaddr_in sa;
byte_zero(&sa,sizeof sa);
+ sa.sin_family = PF_INET;
byte_copy(&sa.sin_addr,4,ip);
byte_copy(&sa.sin_port,2,port);
return bind(fd,(struct sockaddr *) &sa,sizeof sa);
|