From 046d8abf2cd5da1c5ca55e0db0d760f1bbb0c418 Mon Sep 17 00:00:00 2001 From: Bret Lambert Date: Mon, 16 May 2011 10:57:42 +0000 Subject: Print IPv6 addresses in hex, not decimal; from Tim van der Molen committing on behalf of gilles@ --- usr.sbin/smtpd/sockaddr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/smtpd') 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 * @@ -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, -- cgit v1.2.3