From 57b6f51137ac8716516ab13fea6b81d378177b0d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 8 Jun 2020 21:50:24 +0200 Subject: [PATCH] LibC: Add IPPORT_RESERVED and IPPORT_USERRESERVED Gets rid of one dropbear patch. :^) --- Libraries/LibC/netinet/in.h | 3 +++ Ports/dropbear/patches/remove-reserved-ports.patch | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 Ports/dropbear/patches/remove-reserved-ports.patch diff --git a/Libraries/LibC/netinet/in.h b/Libraries/LibC/netinet/in.h index dd32b6ef43..e79d60f3e0 100644 --- a/Libraries/LibC/netinet/in.h +++ b/Libraries/LibC/netinet/in.h @@ -40,6 +40,9 @@ in_addr_t inet_addr(const char*); #define IP_TTL 2 +#define IPPORT_RESERVED 1024 +#define IPPORT_USERRESERVED 5000 + struct in_addr { uint32_t s_addr; }; diff --git a/Ports/dropbear/patches/remove-reserved-ports.patch b/Ports/dropbear/patches/remove-reserved-ports.patch deleted file mode 100644 index 8b2760baab..0000000000 --- a/Ports/dropbear/patches/remove-reserved-ports.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/svr-tcpfwd.c.orig -+++ b/svr-tcpfwd.c -@@ -186,11 +186,6 @@ - TRACE(("invalid port: %d", port)) - goto out; - } -- -- if (!ses.allowprivport && port < IPPORT_RESERVED) { -- TRACE(("can't assign port < 1024 for non-root")) -- goto out; -- } - } - - tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener));