git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
net
/
core
/
filter.c
diff --git
a/net/core/filter.c
b/net/core/filter.c
index
9c2a950
..
f3b8820
100644
(file)
--- a/
net/core/filter.c
+++ b/
net/core/filter.c
@@
-183,9
+183,10
@@
int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
continue;
}
} else {
continue;
}
} else {
- u32 tmp;
- if (!skb_copy_bits(skb, k, &tmp, 4)) {
- A = ntohl(tmp);
+ u32 _tmp, *p;
+ p = skb_header_pointer(skb, k, 4, &_tmp);
+ if (p != NULL) {
+ A = ntohl(*p);
continue;
}
}
continue;
}
}
@@
-208,9
+209,10
@@
int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
continue;
}
} else {
continue;
}
} else {
- u16 tmp;
- if (!skb_copy_bits(skb, k, &tmp, 2)) {
- A = ntohs(tmp);
+ u16 _tmp, *p;
+ p = skb_header_pointer(skb, k, 2, &_tmp);
+ if (p != NULL) {
+ A = ntohs(*p);
continue;
}
}
continue;
}
}
@@
-233,9
+235,10
@@
load_b:
continue;
}
} else {
continue;
}
} else {
- u8 tmp;
- if (!skb_copy_bits(skb, k, &tmp, 1)) {
- A = tmp;
+ u8 _tmp, *p;
+ p = skb_header_pointer(skb, k, 1, &_tmp);
+ if (p != NULL) {
+ A = *p;
continue;
}
}
continue;
}
}