Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4109
b: refs/heads/master
c: 3154e54
h: refs/heads/master
i:
  4107: ca5f6dd
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 5, 2005
1 parent 5ac99bc commit aef0305
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b05b2a49e430220876f8faa7e4778dc7497033c
refs/heads/master: 3154e540e374bbfd62693d95bc8ed51da95efe75
8 changes: 2 additions & 6 deletions trunk/net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ static inline void *load_pointer(struct sk_buff *skb, int k,

int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
{
/* len is UNSIGNED. Byte wide insns relies only on implicit
type casts to prevent reading arbitrary memory locations.
*/
unsigned int len = skb->len-skb->data_len;
struct sock_filter *fentry; /* We walk down these */
void *ptr;
u32 A = 0; /* Accumulator */
Expand Down Expand Up @@ -206,10 +202,10 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
}
return 0;
case BPF_LD|BPF_W|BPF_LEN:
A = len;
A = skb->len;
continue;
case BPF_LDX|BPF_W|BPF_LEN:
X = len;
X = skb->len;
continue;
case BPF_LD|BPF_W|BPF_IND:
k = X + fentry->k;
Expand Down

0 comments on commit aef0305

Please sign in to comment.