> Whoops! Here you go:

Whoops again. Screwed that last patch up. I gotta stop doing this stuff when I'm
tired and I need to check myself :)

Sorry. Again.

--- x/net/core/filter.c 2006-01-05 12:27:17.000000000 -0600
+++ y/net/core/filter.c 2006-01-05 17:02:32.000000000 -0600
@@ -75,7 +75,7 @@ static inline void *load_pointer(struct 
  * 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 sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int 
flen)
 {
        struct sock_filter *fentry;     /* We walk down these */
        void *ptr;
@@ -241,9 +241,9 @@ load_b:
                        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;

--- x/include/linux/filter.h    2006-01-02 21:21:10.000000000 -0600
+++ y/include/linux/filter.h    2006-01-05 17:02:58.000000000 -0600
@@ -143,7 +143,7 @@ static inline unsigned int sk_filter_len
 struct sk_buff;
 struct sock;
 
-extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int 
flen);
+extern unsigned 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__ */

--- x/include/net/sock.h        2006-01-05 23:06:00.000000000 -0600
+++ y/include/net/sock.h        2006-01-05 23:06:06.000000000 -0600
@@ -856,8 +856,8 @@ static inline int sk_filter(struct sock 
                
                filter = sk->sk_filter;
                if (filter) {
-                       int pkt_len = sk_run_filter(skb, filter->insns,
-                                                   filter->len);
+                       unsigned pkt_len = sk_run_filter(skb, filter->insns,
+                                                        filter->len);
                        if (!pkt_len)
                                err = -EPERM;
                        else


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to