From owner-freebsd-jail@freebsd.org Sun Nov 27 20:07:09 2016 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8B25C59016 for ; Sun, 27 Nov 2016 20:07:09 +0000 (UTC) (envelope-from me@cschwarz.com) Received: from orion.uberspace.de (orion.uberspace.de [95.143.172.79]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E70ED30 for ; Sun, 27 Nov 2016 20:07:08 +0000 (UTC) (envelope-from me@cschwarz.com) Received: (qmail 24807 invoked from network); 27 Nov 2016 20:00:24 -0000 Received: from localhost (HELO csarch) (127.0.0.1) by orion.uberspace.de with SMTP; 27 Nov 2016 20:00:24 -0000 Date: Sun, 27 Nov 2016 21:00:22 +0100 From: Christian Schwarz To: freebsd-jail@freebsd.org Subject: jls(8) inconsistent output Message-ID: <20161127200022.GA14008@csarch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.2 (2016-07-01) X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2016 20:07:09 -0000 Hi all, jls(8) is generating inconsistent output regarding IPv4 & IPv6 addresses. Below are some examples documenting the behavior. - For readability, I use `--libxo json` and pipe the output through jq. However, the information is the same as without `--libxo` - These are all jails spawned by ezjail(8), hence spawned using the old rc.conf syntax. Can anyone reproduce these inconsistencies on their system? Possibly with the native jail.conf / other jail managers. Furthermore: I would be willing to try fixing the behavior. However, do you think changing/correcting the output at this point will break existing software? Cheers, Christian --- jls --libxo json IPv6 addresses are not printed at all ... { ... "ipv4": "10.123.234.6", ... } ... jls --libxo json -n all Both address types are printed, but not particularly nicely (should use JSON arrays) Additionally, the ip(4|6) variables seem inconsistent. ... { "ip4": "disable", "ip6": "disable", ... "ip4.addr": "10.123.234.6", "ip4.saddrsel": true, "ip6.addr": "2001:ffff:ffff::b,2001:ffff:ffff::d", "ip6.saddrsel": true } ... jls --libxo json -v Attention: no -n specified Prints IPv6-Addresses as IPv4 addresses. ... { ... "ipv4_addrs": [ "10.123.234.6", "2001:ffff:ffff::b", "2001:ffff:ffff::d" ] } ...