mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
Ports: Update dropbear's patches to use git patches
This commit is contained in:
parent
5f986a91c6
commit
a4c404ea9c
8 changed files with 127 additions and 29 deletions
|
@ -0,0 +1,57 @@
|
|||
From bc87404dcffad4d0e1577bf407a0bfbacb2d79f2 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Meyer <git@the-space.agency>
|
||||
Date: Thu, 28 Apr 2022 01:50:11 +0000
|
||||
Subject: [PATCH 5/5] Remove some unsupported socket operations
|
||||
|
||||
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
|
||||
---
|
||||
netio.c | 12 ++----------
|
||||
1 file changed, 2 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/netio.c b/netio.c
|
||||
index 2ed9bb1..e0e9962 100644
|
||||
--- a/netio.c
|
||||
+++ b/netio.c
|
||||
@@ -304,7 +304,7 @@ void packet_queue_to_iovec(const struct Queue *queue, struct iovec *iov, unsigne
|
||||
buffer *writebuf;
|
||||
|
||||
#ifndef IOV_MAX
|
||||
- #if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
|
||||
+ #if !defined(UIO_MAXIOV)
|
||||
#define IOV_MAX 1024
|
||||
#elif defined(__sgi)
|
||||
#define IOV_MAX 512
|
||||
@@ -346,11 +346,7 @@ void packet_queue_consume(struct Queue *queue, ssize_t written) {
|
||||
}
|
||||
|
||||
void set_sock_nodelay(int sock) {
|
||||
- int val;
|
||||
-
|
||||
- /* disable nagle */
|
||||
- val = 1;
|
||||
- setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&val, sizeof(val));
|
||||
+ (void)sock;
|
||||
}
|
||||
|
||||
#if DROPBEAR_SERVER_TCP_FAST_OPEN
|
||||
@@ -469,7 +465,6 @@ int dropbear_listen(const char* address, const char* port,
|
||||
struct addrinfo hints, *res = NULL, *res0 = NULL;
|
||||
int err;
|
||||
unsigned int nsock;
|
||||
- struct linger linger;
|
||||
int val;
|
||||
int sock;
|
||||
uint16_t *allocated_lport_p = NULL;
|
||||
@@ -548,9 +543,6 @@ int dropbear_listen(const char* address, const char* port,
|
||||
val = 1;
|
||||
/* set to reuse, quick timeout */
|
||||
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val));
|
||||
- linger.l_onoff = 1;
|
||||
- linger.l_linger = 5;
|
||||
- setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&linger, sizeof(linger));
|
||||
|
||||
#if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
|
||||
if (res->ai_family == AF_INET6) {
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue