The following commit has been merged in the merge/master branch: commit 9e3c35330b718d8c4cce0bcd2c823098e124c8b4 Merge: 77ddf971a187eb4bec84c9f08793ff4460a38851 e9d8868215fdb4c61a3440bbcbb34c50e546e6e2 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Mar 20 17:57:53 2016 +0800
Merge branch 'next'
diff --combined net/batman-adv/soft-interface.c index 7679f3a,8a136b6..6746910 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@@ -408,11 -408,17 +408,17 @@@ void batadv_interface_rx(struct net_dev */ nf_reset(skb);
+ if (unlikely(!pskb_may_pull(skb, ETH_HLEN))) + goto dropped; + vid = batadv_get_vid(skb, 0); ethhdr = eth_hdr(skb);
switch (ntohs(ethhdr->h_proto)) { case ETH_P_8021Q: + if (!pskb_may_pull(skb, VLAN_ETH_HLEN)) + goto dropped; + vhdr = (struct vlan_ethhdr *)skb->data;
if (vhdr->h_vlan_encapsulated_proto != ethertype) @@@ -424,8 -430,6 +430,6 @@@ }
/* skb->dev & skb->pkt_type are set here */ - if (unlikely(!pskb_may_pull(skb, ETH_HLEN))) - goto dropped; skb->protocol = eth_type_trans(skb, soft_iface);
/* should not be necessary anymore as we use skb_pull_rcsum() @@@ -1025,12 -1029,12 +1029,12 @@@ static void batadv_softif_destroy_netli unregister_netdevice_queue(soft_iface, head); }
-int batadv_softif_is_valid(const struct net_device *net_dev) +bool batadv_softif_is_valid(const struct net_device *net_dev) { if (net_dev->netdev_ops->ndo_start_xmit == batadv_interface_tx) - return 1; + return true;
- return 0; + return false; }
struct rtnl_link_ops batadv_link_ops __read_mostly = {