Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2023 01:00:18 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 50b52fe14b89 - stable/12 - vlan: Respect IFCAP_LRO mask
Message-ID:  <202308180100.37I10IEh090134@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=50b52fe14b8949539e7fe583d4578b1f2c96dc59

commit 50b52fe14b8949539e7fe583d4578b1f2c96dc59
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-08-12 16:31:22 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-08-18 01:00:07 +0000

    vlan: Respect IFCAP_LRO mask
    
    vlan_capabilities(), used by the IFCAP ioctl, was not respecting the
    IFCAP_LRO bit if it was masked by the requestor.
    
    This prevented if_bridge(4) from automasking LRO with a message like:
    bridge0: can't disable some capabilities on em3.11: 0x400
    
    This also prevented manually disabling LRO from any vlan interface.
    
    PR:             254596
    Reported by:    Paul Vixie <paul@redbarn.org>
    
    (cherry picked from commit b1a39c31a3569bd045a0f40057c3773fc8166f6d)
---
 sys/net/if_vlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 491c1a4fa371..5c84480e15d3 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1748,7 +1748,7 @@ vlan_capabilities(struct ifvlan *ifv)
 	if (p->if_capabilities & IFCAP_VLAN_HWCSUM)
 		cap |= p->if_capabilities & IFCAP_LRO;
 	if (p->if_capenable & IFCAP_VLAN_HWCSUM)
-		ena |= p->if_capenable & IFCAP_LRO;
+		ena |= mena & IFCAP_LRO;
 
 	/*
 	 * If the parent interface can offload TCP connections over VLANs then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308180100.37I10IEh090134>