Skip to content
Snippets Groups Projects
Commit 560a6607 authored by Wolfgang Bumiller's avatar Wolfgang Bumiller Committed by David S. Miller
Browse files

net: sched: em_nbyte: don't add the data offset twice


'ptr' is shifted by the offset and then validated,
the memcmp should not add it a second time.

Signed-off-by: default avatarWolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ecdaea0
No related branches found
No related tags found
No related merge requests found
......@@ -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 = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment