mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
lpc_eth: add missing ndo_change_mtu()
lpc_eth does a copy of transmitted skbs to DMA area, without checking skb lengths, so can trigger buffer overflows : memcpy(pldat->tx_buff_v + txidx * ENET_MAXF_SIZE, skb->data, len); One way to get bigger skbs is to allow MTU changes above the 1500 limit. Calling eth_change_mtu() in ndo_change_mtu() makes sure this cannot happen. Signed-off-by: Eric Dumazet <[email protected]> Cc: Roland Stigge <[email protected]> Cc: Kevin Wells <[email protected]> Acked-by: Roland Stigge <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ed6be3dcfe
commit
e30478598a
1 changed files with 1 additions and 0 deletions
|
|
@ -1320,6 +1320,7 @@ static const struct net_device_ops lpc_netdev_ops = {
|
|||
.ndo_set_rx_mode = lpc_eth_set_multicast_list,
|
||||
.ndo_do_ioctl = lpc_eth_ioctl,
|
||||
.ndo_set_mac_address = lpc_set_mac_address,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
};
|
||||
|
||||
static int lpc_eth_drv_probe(struct platform_device *pdev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue