sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-11-11 01:29:48 +00:00
parent 5903cbe575
commit 62d64fa864
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
841 changed files with 83929 additions and 40755 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if.c,v 1.708 2023/09/16 09:33:27 mpi Exp $ */
/* $OpenBSD: if.c,v 1.709 2023/10/27 20:56:47 jan Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@ -3243,6 +3243,17 @@ ifsetlro(struct ifnet *ifp, int on)
struct ifreq ifrq;
int error = 0;
int s = splnet();
struct if_parent parent;
memset(&parent, 0, sizeof(parent));
if ((*ifp->if_ioctl)(ifp, SIOCGIFPARENT, (caddr_t)&parent) != -1) {
struct ifnet *ifp0 = if_unit(parent.ifp_parent);
if (ifp0 != NULL) {
ifsetlro(ifp0, on);
if_put(ifp0);
}
}
if (!ISSET(ifp->if_capabilities, IFCAP_LRO)) {
error = ENOTSUP;