]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authorderaadt@openbsd.org <deraadt@openbsd.org>
Wed, 31 May 2017 08:58:52 +0000 (08:58 +0000)
committerDamien Miller <djm@mindrot.org>
Thu, 1 Jun 2017 04:54:46 +0000 (14:54 +1000)
These shutdown() SHUT_RDWR are not needed before close()
ok djm markus claudio

Upstream-ID: 36f13ae4ba10f5618cb9347933101eb4a98dbcb5

channels.c
packet.c

index 111a2cfa42ccf45181a0d5b5b840bf3e5918c744..028d5db200c073527844831f4956f921f21fc539 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.364 2017/05/31 00:43:04 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.365 2017/05/31 08:58:52 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -479,8 +479,6 @@ channel_free(Channel *c)
        debug3("channel %d: status: %s", c->self, s);
        free(s);
 
-       if (c->sock != -1)
-               shutdown(c->sock, SHUT_RDWR);
        channel_close_fds(c);
        buffer_free(&c->input);
        buffer_free(&c->output);
index 862aeb052d596bcb5f328fe8f888153851239ce5..6ea2f4bb77732f26ecd38466c88c58fbf4ff076c 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.257 2017/05/31 08:09:45 markus Exp $ */
+/* $OpenBSD: packet.c,v 1.258 2017/05/31 08:58:52 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -570,7 +570,6 @@ ssh_packet_close_internal(struct ssh *ssh, int do_close)
        state->initialized = 0;
        if (do_close) {
                if (state->connection_in == state->connection_out) {
-                       shutdown(state->connection_out, SHUT_RDWR);
                        close(state->connection_out);
                } else {
                        close(state->connection_in);