···3030#include "hash.h"31313232#include <linux/if_arp.h>3333-#include <linux/netfilter_bridge.h>34333534#define MIN(x, y) ((x) < (y) ? (x) : (y))3635···430431 return NOTIFY_DONE;431432}432433433433-static int batman_skb_recv_finish(struct sk_buff *skb)434434-{435435- return NF_ACCEPT;436436-}437437-438434/* receive a packet with the batman ethertype coming on a hard439435 * interface */440436int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,···449455450456 if (atomic_read(&module_state) != MODULE_ACTIVE)451457 goto err_free;452452-453453- /* if netfilter/ebtables wants to block incoming batman454454- * packets then give them a chance to do so here */455455- ret = NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, dev, NULL,456456- batman_skb_recv_finish);457457- if (ret != 1)458458- goto err_out;459458460459 /* packet should hold at least type and version */461460 if (unlikely(skb_headlen(skb) < 2))
+2-6
drivers/staging/batman-adv/send.c
···2929#include "vis.h"3030#include "aggregation.h"31313232-#include <linux/netfilter_bridge.h>33323433static void send_outstanding_bcast_packet(struct work_struct *work);3534···91929293 /* dev_queue_xmit() returns a negative result on error. However on9394 * congestion and traffic shaping, it drops and returns NET_XMIT_DROP9494- * (which is > 0). This will not be treated as an error.9595- * Also, if netfilter/ebtables wants to block outgoing batman9696- * packets then giving them a chance to do so here */9595+ * (which is > 0). This will not be treated as an error. */97969898- return NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,9999- dev_queue_xmit);9797+ return dev_queue_xmit(skb);10098send_skb_err:10199 kfree_skb(skb);102100 return NET_XMIT_DROP;
+8-3
drivers/staging/vt6655/wpactl.c
···766766 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ie_len = %d\n", param->u.wpa_associate.wpa_ie_len);767767768768769769- if (param->u.wpa_associate.wpa_ie &&770770- copy_from_user(&abyWPAIE[0], param->u.wpa_associate.wpa_ie, param->u.wpa_associate.wpa_ie_len))771771- return -EINVAL;769769+ if (param->u.wpa_associate.wpa_ie_len) {770770+ if (!param->u.wpa_associate.wpa_ie)771771+ return -EINVAL;772772+ if (param->u.wpa_associate.wpa_ie_len > sizeof(abyWPAIE))773773+ return -EINVAL;774774+ if (copy_from_user(&abyWPAIE[0], param->u.wpa_associate.wpa_ie, param->u.wpa_associate.wpa_ie_len))775775+ return -EFAULT;776776+ }772777773778 if (param->u.wpa_associate.mode == 1)774779 pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA;