]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Actually set pollfd.events correctly for socket type github-selfhosted/master github/master
authordjm@openbsd.org <djm@openbsd.org>
Mon, 1 Jun 2026 05:40:13 +0000 (05:40 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 1 Jun 2026 05:41:25 +0000 (15:41 +1000)
channels; previously we were throwing away the events we computed if the
channel had a c->sock distinct from it's other read and write fds.
Fortunately, it appears that this case happens rarely, if ever.

Reported by Darafei Praliaskouski via GHPR660

OpenBSD-Commit-ID: d3f483b7919946c5649e8c697d5b927af35aac4b

channels.c

index 949f5776530d415f369187c2a27cd8ff09c5d649..237ab56395d8bd17be8ec884d0ed5756e25a1fbc 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.460 2026/05/31 06:14:42 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.461 2026/06/01 05:40:13 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2863,7 +2863,7 @@ channel_prepare_pollfd(Channel *c, u_int *next_pollfd,
                if (ev != 0) {
                        c->pfds[3] = p;
                        pfd[p].fd = c->sock;
-                       pfd[p].events = 0;
+                       pfd[p].events = ev;
                        dump_channel_poll(__func__, "sock", c, p, &pfd[p]);
                        p++;
                }