diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2011-05-16 10:57:42 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2011-05-16 10:57:42 +0000 |
commit | 046d8abf2cd5da1c5ca55e0db0d760f1bbb0c418 (patch) | |
tree | e4d5a1dd1ba740610c81dc7a19f35d1603679961 /usr.sbin/smtpd | |
parent | 993f59b8d4be35290c450ac321a425978315d7e3 (diff) |
Print IPv6 addresses in hex, not decimal; from Tim van der Molen
committing on behalf of gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/sockaddr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/sockaddr.c b/usr.sbin/smtpd/sockaddr.c index 3f240b9e5ef..da9a04a001b 100644 --- a/usr.sbin/smtpd/sockaddr.c +++ b/usr.sbin/smtpd/sockaddr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sockaddr.c,v 1.3 2011/03/27 17:39:17 eric Exp $ */ +/* $OpenBSD: sockaddr.c,v 1.4 2011/05/16 10:57:41 blambert Exp $ */ /* * Copyright (c) 2010 Eric Faurot <eric@faurot.net> * @@ -125,8 +125,8 @@ sockaddr_as_fqdn(const struct sockaddr *sa, char *dst, size_t max) case AF_INET6: in6_addr = &((const struct sockaddr_in6 *)sa)->sin6_addr; snprintf(dst, max, - "%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d." - "%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d.%d." + "%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x." + "%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x." "ip6.arpa.", in6_addr->s6_addr[15] & 0xf, (in6_addr->s6_addr[15] >> 4) & 0xf, |