From e6647c6ddf1dfaf35b2f70b2d453b63b2ce293e1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 30 Jun 2014 00:39:02 +0100 Subject: [PATCH] udp proxy: Properly zero holes in proxied address The comm_addr we are producing here, from information from a packet forwarded to us by the proxy, is supposed to have all-bits-zero in any holes it may have. Signed-off-by: Ian Jackson --- udp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/udp.c b/udp.c index 33971a8..90f8e9a 100644 --- a/udp.c +++ b/udp.c @@ -104,6 +104,7 @@ static void udp_afterpoll(void *state, struct pollfd *fds, int nfds) continue; } /* proxy protocol supports ipv4 transport only */ + FILLZERO(from); from.sa.sa_family=AF_INET; memcpy(&from.sin.sin_addr,buf_unprepend(st->rbuf,4),4); buf_unprepend(st->rbuf,2); -- 2.30.2