From 44e44bdd89ad234e4456fbc658a524bde0e1474a Mon Sep 17 00:00:00 2001 From: David Bird Date: Mon, 9 Feb 2015 09:25:18 -0800 Subject: [PATCH] Fix bugs introduced in syslog merge. --- src/chilli.c | 4 ++-- src/main-redir.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chilli.c b/src/chilli.c index 9dafabb6..27d05f6e 100644 --- a/src/chilli.c +++ b/src/chilli.c @@ -2657,7 +2657,7 @@ int cb_tun_ind(struct tun_t *tun, struct pkt_buffer *pb, int idx) { * Only the first IP fragment has the UDP header. */ if (iphdr_offset((struct pkt_iphdr_t*)ipph) == 0) { - udph = (struct pkt_udphdr_t *)(ipph + hlen); + udph = (struct pkt_udphdr_t *)(((void *)ipph) + hlen); } if (ntohs(ipph->tot_len) > len || (udph && (ntohs(udph->len) > len))) { @@ -4712,7 +4712,7 @@ int cb_radius_auth_conf(struct radius_t *radius, syslog(LOG_ERR, "Wrong length of MS-CHAP2 success: %d", succattr->l-5); return dnprot_reject(appconn); } - memcpy(appconn->ms2succ, (&succattr->v.t)+3, MS2SUCCSIZE); + memcpy(appconn->ms2succ, ((void*)&succattr->v.t)+3, MS2SUCCSIZE); } #endif diff --git a/src/main-redir.c b/src/main-redir.c index 253168a1..0acaa7e0 100644 --- a/src/main-redir.c +++ b/src/main-redir.c @@ -306,8 +306,8 @@ static int redir_cli_write(redir_request *req, uint8_t *d, int l) { if (w >= 0) { if (w < l) { bcatblk(req->dbuf, d + w, l - w); - sylog(LOG_WARNING, "%d buffering %d - %d = %d (%d queued)", - errno, l, w, l-w, req->dbuf->slen); + syslog(LOG_WARNING, "%s: buffering %d - %d = %d (%d queued)", + strerror(errno), l, w, l-w, req->dbuf->slen); } }