summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbsd-compat/port-tun.c8
-rw-r--r--openbsd-compat/port-tun.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c
index 7b58ea678..49e7b4d99 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)
250} 250}
251 251
252u_char * 252u_char *
253sys_tun_outfilter(struct Channel *c, u_char **data, size_t *dlen) 253sys_tun_outfilter(struct Channel *c, u_char **data, u_int *dlen)
254{ 254{
255 u_char *buf; 255 u_char *buf;
256 u_int32_t *af; 256 u_int32_t *af;
257 int r; 257 int r;
258 size_t xxx_dlen;
258 259
259 if ((r = sshbuf_get_string(&c->output, data, dlen)) != 0) 260 /* XXX new API is incompatible with this signature. */
261 if ((r = sshbuf_get_string(&c->output, data, &xxx_dlen)) != 0)
260 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 262 fatal("%s: buffer error: %s", __func__, ssh_err(r));
263 if (dlen != NULL)
264 *dlen = xxx_dlen;
261 if (*dlen < sizeof(*af)) 265 if (*dlen < sizeof(*af))
262 return (NULL); 266 return (NULL);
263 buf = *data; 267 buf = *data;
diff --git a/openbsd-compat/port-tun.h b/openbsd-compat/port-tun.h
index e608a454d..c53df01fc 100644
--- a/openbsd-compat/port-tun.h
+++ b/openbsd-compat/port-tun.h
@@ -27,7 +27,7 @@ int sys_tun_open(int, int);
27#if defined(SSH_TUN_COMPAT_AF) || defined(SSH_TUN_PREPEND_AF) 27#if defined(SSH_TUN_COMPAT_AF) || defined(SSH_TUN_PREPEND_AF)
28# define SSH_TUN_FILTER 28# define SSH_TUN_FILTER
29int sys_tun_infilter(struct Channel *, char *, int); 29int sys_tun_infilter(struct Channel *, char *, int);
30u_char *sys_tun_outfilter(struct Channel *, u_char **, size_t *); 30u_char *sys_tun_outfilter(struct Channel *, u_char **, u_int *);
31#endif 31#endif
32 32
33#endif 33#endif