Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Sep 2023 14:35:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 273557] Regression preventing bhyve from running inside a jail without IP after f74147e26999838e03a522bf59ea33bef470d356) breaks support for jailing bhyve with IPv4 and IPv6 disabled. Patch included.
Message-ID:  <bug-273557-27103-gAXtq8zjK0@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273557-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273557-27103@https.bugs.freebsd.org/bugzilla/>

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

Bjoern A. Zeeb <bz@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Open                        |In Progress

--- Comment #4 from Bjoern A. Zeeb <bz@FreeBSD.org> ---
Untested but can you try:

{{{
diff --git usr.sbin/bhyve/net_backends.c usr.sbin/bhyve/net_backends.c
index fa7cd9c81f46..9b4ca9e42c99 100644
--- usr.sbin/bhyve/net_backends.c
+++ usr.sbin/bhyve/net_backends.c
@@ -270,21 +270,22 @@ tap_init(struct net_backend *be, const char *devname,
                s =3D socket(pf_list[i], SOCK_DGRAM, 0);
        if (s =3D=3D -1) {
                WPRINTF(("Could open socket"));
-               goto error;
+               goto skip;
        }

        if (ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) {
                (void)close(s);
                WPRINTF(("Could not get interface flags"));
-               goto error;
+               goto skip;
        }
        ifrq.ifr_flags |=3D IFF_UP;
        if (ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) {
                (void)close(s);
                WPRINTF(("Could not set interface flags"));
-               goto error;
+               goto skip;
        }
        (void)close(s);
+skip:
 #endif

 #ifndef WITHOUT_CAPSICUM
}}}

--=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-273557-27103-gAXtq8zjK0>