diff options
author | Patrick McHardy <kaber@trash.net> | 2005-07-05 17:08:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-05 17:08:57 -0400 |
commit | 6935d46c2da64aa032a557374c95336e265cd7ef (patch) | |
tree | d5fcf0146a5dd59baa09d4a03f6c50ba6f1b7ced /net | |
parent | 55820ee2f8c767a2833b21bd365e5753f50bd8ce (diff) |
[NET]: Remove redundant code in net/core/filter.c
skb_header_pointer handles linear and non-linear data, no need to handle
linear data again.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index f3b88205ace2..e1267b465def 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -168,10 +168,6 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | |||
168 | case BPF_LD|BPF_W|BPF_ABS: | 168 | case BPF_LD|BPF_W|BPF_ABS: |
169 | k = fentry->k; | 169 | k = fentry->k; |
170 | load_w: | 170 | load_w: |
171 | if (k >= 0 && (unsigned int)(k+sizeof(u32)) <= len) { | ||
172 | A = ntohl(*(u32*)&data[k]); | ||
173 | continue; | ||
174 | } | ||
175 | if (k < 0) { | 171 | if (k < 0) { |
176 | u8 *ptr; | 172 | u8 *ptr; |
177 | 173 | ||
@@ -194,10 +190,6 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | |||
194 | case BPF_LD|BPF_H|BPF_ABS: | 190 | case BPF_LD|BPF_H|BPF_ABS: |
195 | k = fentry->k; | 191 | k = fentry->k; |
196 | load_h: | 192 | load_h: |
197 | if (k >= 0 && (unsigned int)(k + sizeof(u16)) <= len) { | ||
198 | A = ntohs(*(u16*)&data[k]); | ||
199 | continue; | ||
200 | } | ||
201 | if (k < 0) { | 193 | if (k < 0) { |
202 | u8 *ptr; | 194 | u8 *ptr; |
203 | 195 | ||
@@ -220,10 +212,6 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | |||
220 | case BPF_LD|BPF_B|BPF_ABS: | 212 | case BPF_LD|BPF_B|BPF_ABS: |
221 | k = fentry->k; | 213 | k = fentry->k; |
222 | load_b: | 214 | load_b: |
223 | if (k >= 0 && (unsigned int)k < len) { | ||
224 | A = data[k]; | ||
225 | continue; | ||
226 | } | ||
227 | if (k < 0) { | 215 | if (k < 0) { |
228 | u8 *ptr; | 216 | u8 *ptr; |
229 | 217 | ||