From 82f8b7b2de7aa07a00ffb127f405d871a856a0fc Mon Sep 17 00:00:00 2001 From: jan Date: Tue, 4 Jul 2023 13:37:47 +0000 Subject: [PATCH] Check for interface type ethernet before call ether_brport_isset() Pointed out by bluhm. ok bluhm@ --- sys/net/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 8901f84b0ab..30a36d844a6 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.702 2023/07/02 19:59:15 bluhm Exp $ */ +/* $OpenBSD: if.c,v 1.703 2023/07/04 13:37:47 jan Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -3206,7 +3206,7 @@ ifsetlro(struct ifnet *ifp, int on) KERNEL_ASSERT_LOCKED(); /* for if_flags */ if (on && !ISSET(ifp->if_xflags, IFXF_LRO)) { - if (ether_brport_isset(ifp)) { + if (ifp->if_type == IFT_ETHER && ether_brport_isset(ifp)) { error = EBUSY; goto out; } -- 2.20.1