Skip to content

Commit 55a9396

Browse files
hyperenjugregkh
authored andcommitted
i40e: don't advertise IFF_SUPP_NOFCS
[ Upstream commit a24162f ] i40e advertises IFF_SUPP_NOFCS, allowing users to use the SO_NOFCS socket option. However, this option is silently ignored, as the driver does not check skb->no_fcs, and always enables FCS insertion offload. Fix this by removing the advertisement of IFF_SUPP_NOFCS. This behavior can be reproduced with a simple AF_PACKET socket: import socket s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW) s.setsockopt(socket.SOL_SOCKET, 43, 1) # SO_NOFCS s.bind(("eth0", 0)) s.send(b'\xff' * 64) Previously, send() succeeds but the driver ignores SO_NOFCS. With this change, send() fails with -EPROTONOSUPPORT, as expected. Fixes: 41c445f ("i40e: main driver core") Signed-off-by: Kohei Enju <kohei@enjuk.jp> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260416-iwl-net-submission-2026-04-14-v2-9-686c33c9828d@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 66ee5a3 commit 55a9396

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13883,7 +13883,6 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
1388313883
netdev->neigh_priv_len = sizeof(u32) * 4;
1388413884

1388513885
netdev->priv_flags |= IFF_UNICAST_FLT;
13886-
netdev->priv_flags |= IFF_SUPP_NOFCS;
1388713886
/* Setup netdev TC information */
1388813887
i40e_vsi_config_netdev_tc(vsi, vsi->tc_config.enabled_tc);
1388913888

0 commit comments

Comments
 (0)