]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: wangxun: don't advertise IFF_SUPP_NOFCS
authorRongguang Wei <weirongguang@kylinos.cn>
Wed, 17 Jun 2026 09:28:54 +0000 (17:28 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 19 Jun 2026 01:18:11 +0000 (18:18 -0700)
Like commit a24162f18825("i40e: don't advertise IFF_SUPP_NOFCS"),
ngbe and txgbe also advertises IFF_SUPP_NOFCS and allowing users
to use the SO_NOFCS socket option. But the driver does not check
skb->no_fcs, so this option is silently ignored.

With this change, send() fails with -EPROTONOSUPPORT when AF_PACKET
socket is set SO_NOFCS option.

Signed-off-by: Rongguang Wei <weirongguang@kylinos.cn>
Link: https://patch.msgid.link/20260617092854.133992-1-clementwei90@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c

index 8678c49b892ab364f551902946a84106ab41c5f3..a16221995909f9fa1fadbc1dc41989a4fccfb36d 100644 (file)
@@ -715,7 +715,6 @@ static int ngbe_probe(struct pci_dev *pdev,
        netdev->features |= NETIF_F_GRO;
 
        netdev->priv_flags |= IFF_UNICAST_FLT;
-       netdev->priv_flags |= IFF_SUPP_NOFCS;
        netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 
        netdev->min_mtu = ETH_MIN_MTU;
index ce82e13aa8ae02286b21da013da5fdce1d15027c..20c5a295c6c29682527d6c61eba9287685d7c22a 100644 (file)
@@ -796,7 +796,6 @@ static int txgbe_probe(struct pci_dev *pdev,
        netdev->features |= NETIF_F_RX_UDP_TUNNEL_PORT;
 
        netdev->priv_flags |= IFF_UNICAST_FLT;
-       netdev->priv_flags |= IFF_SUPP_NOFCS;
        netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 
        netdev->min_mtu = ETH_MIN_MTU;