Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16662
b: refs/heads/master
c: 4bad4dc
h: refs/heads/master
v: v3
  • Loading branch information
Kris Katterjohn authored and David S. Miller committed Jan 6, 2006
1 parent 494b07d commit 73f2284
Show file tree
Hide file tree
Showing 4 changed files with 7 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: dbbc0988288d9643044e8bd8c7e7de70016ecd23
refs/heads/master: 4bad4dc919573dbe9a5b41dd9edff279e99822d7
2 changes: 1 addition & 1 deletion trunk/include/linux/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static inline unsigned int sk_filter_len(struct sk_filter *fp)
struct sk_buff;
struct sock;

extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen);
extern unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen);
extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
extern int sk_chk_filter(struct sock_filter *filter, int flen);
#endif /* __KERNEL__ */
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock)

filter = sk->sk_filter;
if (filter) {
int pkt_len = sk_run_filter(skb, filter->insns,
filter->len);
unsigned int pkt_len = sk_run_filter(skb, filter->insns,
filter->len);
if (!pkt_len)
err = -EPERM;
else
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static inline void *load_pointer(struct sk_buff *skb, int k,
* len is the number of filter blocks in the array.
*/

int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
{
struct sock_filter *fentry; /* We walk down these */
void *ptr;
Expand Down Expand Up @@ -241,9 +241,9 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
A = X;
continue;
case BPF_RET|BPF_K:
return ((unsigned int)fentry->k);
return fentry->k;
case BPF_RET|BPF_A:
return ((unsigned int)A);
return A;
case BPF_ST:
mem[fentry->k] = A;
continue;
Expand Down

0 comments on commit 73f2284

Please sign in to comment.