svn commit: r205585 - stable/8/usr.sbin/jls
Ed Schouten
ed at FreeBSD.org
Wed Mar 24 12:12:00 UTC 2010
Author: ed
Date: Wed Mar 24 12:11:59 2010
New Revision: 205585
URL: http://svn.freebsd.org/changeset/base/205585
Log:
MFC r205296:
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.
Modified:
stable/8/usr.sbin/jls/jls.c
Directory Properties:
stable/8/usr.sbin/jls/ (props changed)
Modified: stable/8/usr.sbin/jls/jls.c
==============================================================================
--- stable/8/usr.sbin/jls/jls.c Wed Mar 24 11:21:33 2010 (r205584)
+++ stable/8/usr.sbin/jls/jls.c Wed Mar 24 12:11:59 2010 (r205585)
@@ -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
More information about the svn-src-stable-8
mailing list