Commit 6febb776 authored by David S. Miller's avatar David S. Miller Committed by Arnaldo Carvalho de Melo

[NET]: SG without checksum support is illegal.

parent 021a7627
......@@ -2582,6 +2582,16 @@ int register_netdevice(struct net_device *dev)
if ((ret = kobject_register(&dev->kobj)))
goto out_err;
/* Fix illegal SG+CSUM combinations. */
if ((dev->features & NETIF_F_SG) &&
!(dev->features & (NETIF_F_IP_CSUM |
NETIF_F_NO_CSUM |
NETIF_F_HW_CSUM))) {
printk("%s: Dropping NETIF_F_SG since no checksum feature.\n",
dev->name);
dev->features &= ~NETIF_F_SG;
}
/*
* nil rebuild_header routine,
* that should be never called and used as just bug trap.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment