From: Patrick McHardy Date: Tue, 5 Jul 2005 21:08:57 +0000 (-0700) Subject: [NET]: Remove redundant code in net/core/filter.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6935d46c2da64aa032a557374c95336e265cd7ef;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Acked-by: Herbert Xu Signed-off-by: David S. Miller --- 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) 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; @@ -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; @@ -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;