[openssh-commits] [openssh] 02/03: kludge around tun API mismatch betterer

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Jan 15 03:09:36 EST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit bc42cc6fe784f36df225c44c93b74830027cb5a2
Author: Damien Miller <djm at mindrot.org>
Date:   Thu Jan 15 03:08:29 2015 +1100

    kludge around tun API mismatch betterer
---
 openbsd-compat/port-tun.c | 8 ++++++--
 openbsd-compat/port-tun.h | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c
index 7b58ea6..49e7b4d 100644
--- a/openbsd-compat/port-tun.c
+++ b/openbsd-compat/port-tun.c
@@ -250,14 +250,18 @@ sys_tun_infilter(struct Channel *c, char *buf, int len)
 }
 
 u_char *
-sys_tun_outfilter(struct Channel *c, u_char **data, size_t *dlen)
+sys_tun_outfilter(struct Channel *c, u_char **data, u_int *dlen)
 {
 	u_char *buf;
 	u_int32_t *af;
 	int r;
+	size_t xxx_dlen;
 
-	if ((r = sshbuf_get_string(&c->output, data, dlen)) != 0)
+	/* XXX new API is incompatible with this signature. */
+	if ((r = sshbuf_get_string(&c->output, data, &xxx_dlen)) != 0)
 		fatal("%s: buffer error: %s", __func__, ssh_err(r));
+	if (dlen != NULL)
+		*dlen = xxx_dlen;
 	if (*dlen < sizeof(*af))
 		return (NULL);
 	buf = *data;
diff --git a/openbsd-compat/port-tun.h b/openbsd-compat/port-tun.h
index e608a45..c53df01 100644
--- a/openbsd-compat/port-tun.h
+++ b/openbsd-compat/port-tun.h
@@ -27,7 +27,7 @@ int	  sys_tun_open(int, int);
 #if defined(SSH_TUN_COMPAT_AF) || defined(SSH_TUN_PREPEND_AF)
 # define SSH_TUN_FILTER
 int	 sys_tun_infilter(struct Channel *, char *, int);
-u_char	*sys_tun_outfilter(struct Channel *, u_char **, size_t *);
+u_char	*sys_tun_outfilter(struct Channel *, u_char **, u_int *);
 #endif
 
 #endif

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list