Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Dec 2023 09:44:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 275920] Kernel crash in sys/netlink/route/iface.c:124
Message-ID:  <bug-275920-7501-z29hWHe16t@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-275920-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-275920-7501@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=3D275920

Kristof Provost <kp@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jhibbits@FreeBSD.org,
                   |                            |kp@freebsd.org,
                   |                            |loos@FreeBSD.org,
                   |                            |mizhka@FreeBSD.org

--- Comment #2 from Kristof Provost <kp@freebsd.org> ---
That's interesting. The cause is fairly obvious. e6000sw creates struct ifn=
ets
that don't have an ioctl handler, and that's triggering this crash.

The following is probably the best fix, assuming that the ioctl-less e6000sw
ifnet is intentional:

diff --git a/sys/net/if.c b/sys/net/if.c
index 9f44223af0dd..c3c27fbf678f 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4871,6 +4871,9 @@ if_resolvemulti(if_t ifp, struct sockaddr **srcs, str=
uct
sockaddr *dst)
 int
 if_ioctl(if_t ifp, u_long cmd, void *data)
 {
+       if (ifp->if_ioctl =3D=3D NULL)
+               return (EOPNOTSUPP);
+
        return (ifp->if_ioctl(ifp, cmd, data));
 }

--=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-275920-7501-z29hWHe16t>