From: jan Date: Tue, 28 Jun 2022 09:41:24 +0000 (+0000) Subject: ifconfig(8) return "Not supported" if you try to configure tso on a non-tso X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3bee481639dcca8122cced273d77900d0123871d;p=openbsd ifconfig(8) return "Not supported" if you try to configure tso on a non-tso supported interface. pointed out by bluhm@ OK bluhm@ --- diff --git a/sys/net/if.c b/sys/net/if.c index 8a29aec0f03..0493f1b113a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.655 2022/06/28 08:01:40 mvs Exp $ */ +/* $OpenBSD: if.c,v 1.656 2022/06/28 09:41:24 jan Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -2054,6 +2054,10 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) } splx(s); + } else if (!ISSET(ifp->if_capabilities, IFCAP_TSO) && + ISSET(ifr->ifr_flags, IFXF_TSO)) { + ifr->ifr_flags &= ~IFXF_TSO; + error = ENOTSUP; } #endif