diff options
author | 2006-03-14 22:49:41 +0000 | |
---|---|---|
committer | 2006-03-14 22:49:41 +0000 | |
commit | e3a3826d0499f6d85152e56d520b51c3ea6f8656 (patch) | |
tree | 3746bae57962cb6440dbaafd8e3ee81034be842d /libexec/spamd/spamd.c | |
parent | move wsconsctl up earlier, so that any key changes made can be used (diff) | |
download | wireguard-openbsd-e3a3826d0499f6d85152e56d520b51c3ea6f8656.tar.xz wireguard-openbsd-e3a3826d0499f6d85152e56d520b51c3ea6f8656.zip |
spamd can show the wrong IP address to clients in a %A message because
the per-connection copy of the connecting address was being pointed
to the on-stack copy. Spotted (and fix suggested) by Michael Durket
in pr 5046
ok deraadt@
Diffstat (limited to 'libexec/spamd/spamd.c')
-rw-r--r-- | libexec/spamd/spamd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c index 3235dfbd9ac..50817fe6c0e 100644 --- a/libexec/spamd/spamd.c +++ b/libexec/spamd/spamd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spamd.c,v 1.81 2005/11/30 20:44:07 deraadt Exp $ */ +/* $OpenBSD: spamd.c,v 1.82 2006/03/14 22:49:41 beck Exp $ */ /* * Copyright (c) 2002 Theo de Raadt. All rights reserved. @@ -576,7 +576,7 @@ initcon(struct con *cp, int fd, struct sockaddr *sa) errx(1, "not supported yet"); memcpy(&cp->ss, sa, sa->sa_len); cp->af = sa->sa_family; - cp->ia = &((struct sockaddr_in *)sa)->sin_addr; + cp->ia = &((struct sockaddr_in *)&cp->ss)->sin_addr; cp->blacklists = sdl_lookup(blacklists, cp->af, cp->ia); cp->stutter = (greylist && !grey_stutter && cp->blacklists == NULL) ? 0 : stutter; |