Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2022 17:01:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 268377] jail -cr <jail> fails to set ipv6-address alias with ifconfig under certain conditions
Message-ID:  <bug-268377-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268377

            Bug ID: 268377
           Summary: jail -cr <jail> fails to set ipv6-address alias with
                    ifconfig under certain conditions
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: ahkithaama@proton.me

I have a jail-Configuration in /etc/jail.conf:

testjail {
    exec.start =3D "/bin/sh /etc/rc";
    exec.stop =3D "/bin/sh /etc/rc.shutdown";
    exec.clean;
    host.hostname =3D "testjail";
    path =3D "/VMs/jails/$name";
    interface =3D "msk0";
    ip6.addr =3D "fd9e:21a7:a92c:2323::1/40";
    mount =3D "/tmp  $path/tmp  nullfs  rw 0 0";
}


If I start the jail with
  jail -c testjail
-> No problem

If I stop the jail with
  jail -r testjail
-> No problem

If I restart a running jail with
  jail -cr testjail
-> I get following error:
testjail: run command: /sbin/ifconfig msk0 inet6 fd9e:21a7:a92c:2323::1/40 >
alias
ifconfig: >: bad value
jail: testjail: /sbin/ifconfig msk0 inet6 fd9e:21a7:a92c:2323::1/40 > alias:
failed

There's a invalid character ('>') in the ifconfig line.
Where it come from? I don't know.

The failure will not occur if I delete the "mount"-Line from the Configurat=
ion
(It doesn't matter have a 'mount'-Line or 'mount.fstab').

The failure will also not occur if I append the ifconfig-Parameter
'description' at the end of 'ip6-addr' like:
ip6.addr =3D "fd9e:21a7:a92c:2323::1/40 description a";

And the failure will only happen with ip6.addr
The same with ip4.addr is not a problem.

It seems to me there is a problem with string handling in the jail command.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268377-227>