netlink: skip VLAN proto byte swap on s390x (big-endian)

s390x is a big-endian architecture, so VLAN protocol values are already
in network byte order. The existing unconditional byte swap performed
when setting IFLA_VF_VLAN_INFO corrupts the VLAN protocol field on s390x,
causing drivers to reject the request with protocol not supported.

Signed-off-by: Ashok Pariya <ashok.pariya@ibm.com>
This commit is contained in:
Ashok Pariya
2026-01-05 10:24:00 +01:00
committed by Alessandro Boch
parent c6faf428e8
commit e79c63fbd0
+1 -1
View File
@@ -699,7 +699,7 @@ func (h *Handle) LinkSetVfVlanQosProto(link Link, vf, vlan, qos, proto int) erro
Vlan: uint32(vlan),
Qos: uint32(qos),
},
VlanProto: (uint16(proto)>>8)&0xFF | (uint16(proto)&0xFF)<<8,
VlanProto: nl.Swap16(uint16(proto)),
}
vfVlanList.AddRtAttr(nl.IFLA_VF_VLAN_INFO, vfmsg.Serialize())