Skip to content

Commit

Permalink
[NET]: Remove redundant code in net/core/filter.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 5, 2005
1 parent 55820ee commit 6935d46
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
case BPF_LD|BPF_W|BPF_ABS:
k = fentry->k;
load_w:
if (k >= 0 && (unsigned int)(k+sizeof(u32)) <= len) {
A = ntohl(*(u32*)&data[k]);
continue;
}
if (k < 0) {
u8 *ptr;

Expand All @@ -194,10 +190,6 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
case BPF_LD|BPF_H|BPF_ABS:
k = fentry->k;
load_h:
if (k >= 0 && (unsigned int)(k + sizeof(u16)) <= len) {
A = ntohs(*(u16*)&data[k]);
continue;
}
if (k < 0) {
u8 *ptr;

Expand All @@ -220,10 +212,6 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
case BPF_LD|BPF_B|BPF_ABS:
k = fentry->k;
load_b:
if (k >= 0 && (unsigned int)k < len) {
A = data[k];
continue;
}
if (k < 0) {
u8 *ptr;

Expand Down

0 comments on commit 6935d46

Please sign in to comment.