jls(8) inconsistent output

Christian Schwarz me at cschwarz.com
Sun Nov 27 20:07:09 UTC 2016


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"
        ]
      }
  ...



More information about the freebsd-jail mailing list