diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2004-03-31 10:53:11 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2004-03-31 10:53:11 +0000 |
commit | 63cf99cf98af112cbab0101311f9abdfd2da7e18 (patch) | |
tree | 2e0ed1a8951503905ad1b1a460ecf23fbe40115b /sbin | |
parent | 06bcf646dfaa3274483ec8dc8c8bdf18bef838df (diff) |
Use sysdep_sa_len() instead of sa->sa_len, also correct a log_fatal() message. hshoexer@ ok.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/monitor.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/isakmpd/monitor.c b/sbin/isakmpd/monitor.c index 8ad17ad3ebb..c48ed5cf148 100644 --- a/sbin/isakmpd/monitor.c +++ b/sbin/isakmpd/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.16 2004/03/29 17:07:59 deraadt Exp $ */ +/* $OpenBSD: monitor.c,v 1.17 2004/03/31 10:53:10 ho Exp $ */ /* * Copyright (c) 2003 Håkan Olsson. All rights reserved. @@ -44,6 +44,8 @@ #include <keynote.h> #endif +#include "sysdep.h" + #include "conf.h" #include "log.h" #include "monitor.h" @@ -552,7 +554,7 @@ monitor_loop (int debugging) if (!fds) { kill (m_state.pid, SIGTERM); - log_fatal ("monitor_loop: calloc() failed"); + log_fatal ("monitor_loop: malloc (%u) failed", fdsn); return; } @@ -1088,9 +1090,10 @@ m_priv_check_bind (const struct sockaddr *sa, socklen_t salen) return 1; } - if (sa->sa_len != salen) + if (sysdep_sa_len ((struct sockaddr *)sa) != salen) { - log_print ("Length mismatch: %d %d", (int) sa->sa_len, (int) salen); + log_print ("Length mismatch: %d %d", + (int) sysdep_sa_len ((struct sockaddr *)sa), (int) salen); return 1; } |