From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: "H . Peter Anvin" <hpa@zytor.com>,
"YOSHIFUJI Hideaki" <yoshfuji@linux-ipv6.org>,
"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH] daemon: remove unnecesary restriction for listener fd
Date: Thu, 26 Jun 2025 02:51:39 -0700 [thread overview]
Message-ID: <20250626095139.70751-1-carenas@gmail.com> (raw)
Since df076bdbcc ([PATCH] GIT: Listen on IPv6 as well, if available.,
2005-07-23), any file descriptor assigned to a listening socket was
validated to be within the range to be used in an FDSET later.
6573faff34 (NO_IPV6 support for git daemon, 2005-09-28), moves to
use poll() instead of select(), that doesn't have that restriction,
so remove the original check.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
daemon.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/daemon.c b/daemon.c
index d1be61fd57..99741f0b45 100644
--- a/daemon.c
+++ b/daemon.c
@@ -990,11 +990,6 @@ static int setup_named_sock(char *listen_addr, int listen_port, struct socketlis
sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sockfd < 0)
continue;
- if (sockfd >= FD_SETSIZE) {
- logerror("Socket descriptor too large");
- close(sockfd);
- continue;
- }
#ifdef IPV6_V6ONLY
if (ai->ai_family == AF_INET6) {
--
2.50.0.132.g8e5a977e07
next reply other threads:[~2025-06-26 9:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 9:51 Carlo Marcelo Arenas Belón [this message]
2025-06-26 13:17 ` [PATCH] daemon: remove unnecesary restriction for listener fd Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250626095139.70751-1-carenas@gmail.com \
--to=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=hpa@zytor.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox