From owner-svn-src-head@FreeBSD.ORG Thu Mar 18 20:13:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78E43106566B; Thu, 18 Mar 2010 20:13:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 680D88FC16; Thu, 18 Mar 2010 20:13:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IKD4Cp025630; Thu, 18 Mar 2010 20:13:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IKD4jv025628; Thu, 18 Mar 2010 20:13:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003182013.o2IKD4jv025628@svn.freebsd.org> From: Ed Schouten Date: Thu, 18 Mar 2010 20:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205296 - head/usr.sbin/jls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 20:13:04 -0000 Author: ed Date: Thu Mar 18 20:13:04 2010 New Revision: 205296 URL: http://svn.freebsd.org/changeset/base/205296 Log: Properly progress through the list of IPv6 addresses using in6_addr size. Right now if a jail has multiple IPv6 addresses, it will print them shifting only 4 bytes at a time. Example: 2001:4dd0:ff41::b23f:a9 2001:4dd0:ff41::b23f:aa Becomes: 2001:4dd0:ff41::b23f:a9 ff41::b23f:a9:2001:4dd0 By casting to in6_addr, it uses the correct offsets. MFC after: 1 week Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Thu Mar 18 19:10:03 2010 (r205295) +++ head/usr.sbin/jls/jls.c Thu Mar 18 20:13:04 2010 (r205296) @@ -355,7 +355,7 @@ print_jail(int pflags, int jflags) count = params[7].jp_valuelen / sizeof(struct in6_addr); for (ai = 0; ai < count; ai++) if (inet_ntop(AF_INET6, - &((struct in_addr *)params[7].jp_value)[ai], + &((struct in6_addr *)params[7].jp_value)[ai], ipbuf, sizeof(ipbuf)) == NULL) err(1, "inet_ntop"); else