Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2023 20:04:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273315] ifconfig -g does not show epair from removed jail
Message-ID:  <bug-273315-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 273315
           Summary: ifconfig -g does not show epair from removed jail
           Product: Base System
           Version: 13.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jcaplan@blackberry.com

Steps to reproduce
------------------

root@freebsd:/usr/home/jcaplan # ifconfig epair create
epair0a
root@freebsd:/usr/home/jcaplan # ifconfig -g epair
epair0b
epair0a
root@freebsd:/usr/home/jcaplan # jail -c name=3Dtest vnet vnet.interface=3D=
epair0b
persist
root@freebsd:/usr/home/jcaplan # jls -v
   JID  Hostname                      Path
        Name                          State
        CPUSetID
        IP Address(es)
     1                                /
        test                          ACTIVE
        3
root@freebsd:/usr/home/jcaplan # ifconfig -g epair
epair0a
root@freebsd:/usr/home/jcaplan # jail -r test
root@freebsd:/usr/home/jcaplan # ifconfig -g epair
epair0a
root@freebsd:/usr/home/jcaplan # ifconfig epair0b
epair0b: flags=3D8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu =
1500
        options=3D8<VLAN_MTU>
        ether 02:b4:31:04:84:0b
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Actual Results:=20
---------------
ifconfig -g does not show epair0b after jail is removed

Expected Results:
-----------------
ifconfig -g should show epair0b after jail is removed


Build Date & Hardware:
----------------------
root@freebsd:/usr/home/jcaplan # uname -a
FreeBSD freebsd 13.2-RELEASE FreeBSD 13.2-RELEASE
releng/13.2-n254617-525ecfdad597 GENERIC amd64


Additional Information
----------------------
When detaching epair0b to move into the jail, if_vmove() finds an ifc:

rc =3D if_detach_internal(ifp, 1, &ifc); // ifc !=3D NULL

However, when moving epair0b back in the other direction and detaching from=
 the
jail vnet, ifc =3D=3D NULL so if_attach_internal() skips
if_clone_addgroup(ifc=3Depair)

--=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-273315-227>