projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ecdaea
)
net: sched: em_nbyte: don't add the data offset twice
author
Wolfgang Bumiller
<w.bumiller@proxmox.com>
Thu, 18 Jan 2018 10:32:35 +0000
(11:32 +0100)
committer
David S. Miller
<davem@davemloft.net>
Wed, 24 Jan 2018 19:52:40 +0000
(14:52 -0500)
'ptr' is shifted by the offset and then validated,
the memcmp should not add it a second time.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/em_nbyte.c
patch
|
blob
|
history
diff --git
a/net/sched/em_nbyte.c
b/net/sched/em_nbyte.c
index df3110d695857e672f1a50f83399a7f63959dd00..07c10bac06a079380576c0d025c397fea990b2ec 100644
(file)
--- a/
net/sched/em_nbyte.c
+++ b/
net/sched/em_nbyte.c
@@
-51,7
+51,7
@@
static int em_nbyte_match(struct sk_buff *skb, struct tcf_ematch *em,
if (!tcf_valid_offset(skb, ptr, nbyte->hdr.len))
return 0;
- return !memcmp(ptr
+ nbyte->hdr.off
, nbyte->pattern, nbyte->hdr.len);
+ return !memcmp(ptr, nbyte->pattern, nbyte->hdr.len);
}
static struct tcf_ematch_ops em_nbyte_ops = {