]> rtime.felk.cvut.cz Git - socketcan-devel.git/blobdiff - kernel/2.6/drivers/net/can/usb/ems_usb.c
To prevent the CAN drivers to operate on invalid socketbuffers the skbs are
[socketcan-devel.git] / kernel / 2.6 / drivers / net / can / usb / ems_usb.c
index d5ca8e2b8680b05480796ec41f5416cd57ef6220..613852b5b1c60266081e183a0939eceb0c9a686a 100644 (file)
@@ -777,6 +777,9 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
        size_t size = CPC_HEADER_SIZE + CPC_MSG_HEADER_LEN
                        + sizeof(struct cpc_can_msg);
 
+       if (can_dropped_invalid_skb(netdev, skb))
+               return NETDEV_TX_OK;
+
        /* create a URB, and a buffer for it, and copy the data to the URB */
        urb = usb_alloc_urb(0, GFP_ATOMIC);
        if (!urb) {