Skip to content

Commit

Permalink
upstream commit
Browse files Browse the repository at this point in the history
write the correct buffer when tunnel forwarding; doesn't
matter on OpenBSD (they are the same) but does matter on portable where we
use an output filter to translate os-specific tun/tap headers

Upstream-ID: f1ca94eff48404827b12e1d12f6139ee99a72284
  • Loading branch information
djmdjm committed Sep 24, 2017
1 parent 55486f5 commit c704f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions channels.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: channels.c,v 1.373 2017/09/23 22:04:07 djm Exp $ */
/* $OpenBSD: channels.c,v 1.374 2017/09/24 09:50:01 djm Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
Expand Down Expand Up @@ -1941,7 +1941,7 @@ channel_handle_wfd(struct ssh *ssh, Channel *c,

if (c->datagram) {
/* ignore truncated writes, datagrams might get lost */
len = write(c->wfd, data, dlen);
len = write(c->wfd, buf, dlen);
free(data);
if (len < 0 && (errno == EINTR || errno == EAGAIN ||
errno == EWOULDBLOCK))
Expand Down

0 comments on commit c704f64

Please sign in to comment.