diff options
author | 2019-02-18 09:43:57 +0000 | |
---|---|---|
committer | 2019-02-18 09:43:57 +0000 | |
commit | 255fe563d1ca6a4474a5f52dbaea53d72102813c (patch) | |
tree | aad4c97f6827d4b4cf9481208d816a8fdb9735f9 /usr.sbin/bgpd/logmsg.c | |
parent | regen (diff) | |
download | wireguard-openbsd-255fe563d1ca6a4474a5f52dbaea53d72102813c.tar.xz wireguard-openbsd-255fe563d1ca6a4474a5f52dbaea53d72102813c.zip |
Do not depend on the length field of struct sockaddr instead pass the
length to the various functions needing it. Helps portability.
OK benno@
Diffstat (limited to 'usr.sbin/bgpd/logmsg.c')
-rw-r--r-- | usr.sbin/bgpd/logmsg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/logmsg.c b/usr.sbin/bgpd/logmsg.c index 00ff515fca5..a75386aa4d6 100644 --- a/usr.sbin/bgpd/logmsg.c +++ b/usr.sbin/bgpd/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.3 2017/05/28 20:14:15 claudio Exp $ */ +/* $OpenBSD: logmsg.c,v 1.4 2019/02/18 09:43:57 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -198,13 +198,13 @@ log_notification(const struct peer *peer, u_int8_t errcode, u_int8_t subcode, } void -log_conn_attempt(const struct peer *peer, struct sockaddr *sa) +log_conn_attempt(const struct peer *peer, struct sockaddr *sa, socklen_t len) { char *p; const char *b; if (peer == NULL) { /* connection from non-peer, drop */ - b = log_sockaddr(sa); + b = log_sockaddr(sa, len); logit(LOG_INFO, "connection from non-peer %s refused", b); } else { /* only log if there is a chance that the session may come up */ |