X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/7d31df0e8ab53aec525ae75b04f84f0e0dc8e859..c1ddd026a2cc6d68a0d47033817a3d9b7670a71e:/udp.c diff --git a/udp.c b/udp.c index 9bb1234..d2c0aad 100644 --- a/udp.c +++ b/udp.c @@ -137,9 +137,9 @@ static void udp_afterpoll(void *state, struct pollfd *fds, int nfds) } /* proxy protocol supports ipv4 transport only */ from.sa.sa_family=AF_INET; - memcpy(&from.sin.sin_addr,buf_unprepend(cc->rbuf,4),4); + BUF_GET_BYTES(unprepend,cc->rbuf,&from.sin.sin_addr,4); buf_unprepend(cc->rbuf,2); - memcpy(&from.sin.sin_port,buf_unprepend(cc->rbuf,2),2); + BUF_GET_BYTES(unprepend,cc->rbuf,&from.sin.sin_port,2); } struct comm_addr ca; ca.comm=&cc->ops;