mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
fallback for old glibc and fastopen
memset rather than = {0} initialiser --HG-- branch : fastopen
This commit is contained in:
parent
76a3eb393c
commit
86a717c80c
3
dbutil.c
3
dbutil.c
@ -1070,9 +1070,10 @@ static void connect_try_next(struct dropbear_progress_connection *c) {
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
struct msghdr message = {0};
|
struct msghdr message;
|
||||||
int flags;
|
int flags;
|
||||||
int res;
|
int res;
|
||||||
|
memset(&message, 0x0, sizeof(message));
|
||||||
message.msg_name = r->ai_addr;
|
message.msg_name = r->ai_addr;
|
||||||
message.msg_namelen = r->ai_addrlen;
|
message.msg_namelen = r->ai_addrlen;
|
||||||
|
|
||||||
|
7
dbutil.h
7
dbutil.h
@ -80,6 +80,13 @@ void set_sock_priority(int sock, enum dropbear_prio prio);
|
|||||||
#if defined(__linux__) && HAVE_SENDMSG
|
#if defined(__linux__) && HAVE_SENDMSG
|
||||||
#define DROPBEAR_TCP_FAST_OPEN
|
#define DROPBEAR_TCP_FAST_OPEN
|
||||||
void set_listen_fast_open(int sock);
|
void set_listen_fast_open(int sock);
|
||||||
|
/* may be supported by kernel but not libc */
|
||||||
|
#ifndef TCP_FASTOPEN
|
||||||
|
#define TCP_FASTOPEN 23
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_FASTOPEN
|
||||||
|
#define MSG_FASTOPEN 0x20000000
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int dropbear_listen(const char* address, const char* port,
|
int dropbear_listen(const char* address, const char* port,
|
||||||
|
Loading…
Reference in New Issue
Block a user