Date: Sat, 23 Jul 2022 10:06:15 -0700 From: James Gritton <jamie@gritton.org> To: freebsd-jail@freebsd.org Cc: Kurt Jaeger <pi@freebsd.org> Subject: Re: jail created with ip4=new and ipv4.addr shows ip4=disable on jail -s Message-ID: <8e1bf678efc18f9d3c4d5ee16df3caa1@gritton.org> In-Reply-To: <Ytvh5CPwgGa02f1q@fc.opsec.eu> References: <Ytvh5CPwgGa02f1q@fc.opsec.eu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2022-07-23 04:56, Kurt Jaeger wrote: > Hello, > > On a 13.1 box: > > The jail is created with: > > /usr/sbin/jail -c allow.raw_sockets allow.sysvipc devfs_ruleset=4 > host.hostname=somehostname path=/somepath ip4=new ip4.addr=<someipv4> > ip6=new ip6.addr=<someipv6> command=/bin/sh /etc/rc > > But: > > jail -s > > displays: > > [...] ip4=disable ip6=disable > > Is that a bug and if not, why does it behave like that ? It's a bug in the reporting. ip4 is presented as a jailsys parameter with its values of disable, inherit, and new. jail_get(2) reports such values based on flags in the prison structure, but ip4 and ip6 are only stored as a single bit with disable indistinguishable from new. jail_get should be looking at the number of IP addresses, which is what tells the difference. - Jamie
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8e1bf678efc18f9d3c4d5ee16df3caa1>