sync code with last improvements from OpenBSD
This commit is contained in:
parent
5903cbe575
commit
62d64fa864
841 changed files with 83929 additions and 40755 deletions
13
sys/net/if.c
13
sys/net/if.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue