summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-tun.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2015-01-15 03:08:29 +1100
committerDamien Miller <djm@mindrot.org>2015-01-15 03:08:29 +1100
commitbc42cc6fe784f36df225c44c93b74830027cb5a2 (patch)
treed7ab3a72b9224260f06bf83cf0d563f96359c115 /openbsd-compat/port-tun.c
parentc332110291089b624fa0951fbf2d1ee6de525b9f (diff)
kludge around tun API mismatch betterer
Diffstat (limited to 'openbsd-compat/port-tun.c')
-rw-r--r--openbsd-compat/port-tun.c8
1 files changed, 6 insertions, 2 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;