Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194907
b: refs/heads/master
c: e5042a2
h: refs/heads/master
i:
  194905: 124bbbf
  194903: baf17df
v: v3
  • Loading branch information
Jan Engelhardt committed Mar 18, 2010
1 parent 8d0e71c commit b2bf332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d1c397db95f1c0cd95f6fa633c1e68acfaacec3
refs/heads/master: e5042a290097b7c2fc9b6a247585b6ed07b13026
3 changes: 3 additions & 0 deletions trunk/net/netfilter/xt_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/etherdevice.h>

Expand All @@ -29,6 +30,8 @@ static bool mac_mt(const struct sk_buff *skb, const struct xt_match_param *par)
const struct xt_mac_info *info = par->matchinfo;
bool ret;

if (skb->dev == NULL || skb->dev->type != ARPHRD_ETHER)
return false;
if (skb_mac_header(skb) < skb->head)
return false;
if (skb_mac_header(skb) + ETH_HLEN > skb->data)
Expand Down

0 comments on commit b2bf332

Please sign in to comment.