summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2009-03-03 22:58:31 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2009-03-03 22:58:31 +0000
commitdad31a1803fc6c57b11220b8bc2100bafb51c739 (patch)
tree9f4f310f5c377a3859499b0e4632b687d580e072 /lib
parent706fcd44e6d2d86dde21b7d8abb4a3e1bae2b8a2 (diff)
fixup address in more places
Diffstat (limited to 'lib')
-rw-r--r--lib/Zinternal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Zinternal.c b/lib/Zinternal.c
index ff01db1..ba742a7 100644
--- a/lib/Zinternal.c
+++ b/lib/Zinternal.c
@@ -734,6 +734,11 @@ Z_NewFormatHeader(ZNotice_t *notice,
(void) memcpy(&notice->z_uid.zuid_addr, &__My_addr, sizeof(__My_addr));
+ (void) memset(&notice->z_sender_sockaddr, 0, sizeof(notice->z_sender_sockaddr));
+ notice->z_sender_sockaddr.ip4.sin_family = AF_INET; /*XXX*/
+ notice->z_sender_sockaddr.ip4.sin_port = notice->z_port;
+ (void) memcpy(&notice->z_sender_sockaddr.ip4.sin_addr, &__My_addr, sizeof(__My_addr));
+
notice->z_multiuid = notice->z_uid;
if (!version[0])
@@ -1235,6 +1240,10 @@ Z_SendFragmentedNotice(ZNotice_t *notice,
htonl((u_long) partnotice.z_uid.tv.tv_usec);
(void) memcpy((char *)&partnotice.z_uid.zuid_addr, &__My_addr,
sizeof(__My_addr));
+ (void) memset(&notice->z_sender_sockaddr, 0, sizeof(notice->z_sender_sockaddr));
+ notice->z_sender_sockaddr.ip4.sin_family = AF_INET; /*XXX*/
+ notice->z_sender_sockaddr.ip4.sin_port = notice->z_port;
+ (void) memcpy(&notice->z_sender_sockaddr.ip4.sin_addr, &__My_addr, sizeof(__My_addr));
}
message_len = min(notice->z_message_len-offset, fragsize);
partnotice.z_message = notice->z_message+offset;