chiark
/
gitweb
/
~ian
/
secnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
22fb98a
)
udp proxy: Properly zero holes in proxied address
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 29 Jun 2014 23:39:02 +0000
(
00:39
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 2 Oct 2014 15:30:20 +0000
(16:30 +0100)
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 <ijackson@chiark.greenend.org.uk>
udp.c
patch
|
blob
|
history
diff --git
a/udp.c
b/udp.c
index 33971a8129da6f4a454213e4b49d4a6903cb1f7e..90f8e9a36602b7cc6ff3fb72e7d7852e4e6f14ed 100644
(file)
--- 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);