Commit a3abb65c authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1341 from pbhole/fix_http_filter

examples: fixed http_filter example
parents ac1334fe ec60e75c
......@@ -92,7 +92,8 @@ int http_filter(struct __sk_buff *skb) {
unsigned long p[7];
int i = 0;
int j = 0;
for (i = payload_offset ; i < (payload_offset + 7) ; i++) {
const int last_index = payload_offset + 7;
for (i = payload_offset ; i < last_index ; i++) {
p[j] = load_byte(skb , i);
j++;
}
......
......@@ -63,7 +63,8 @@ int http_filter(struct __sk_buff *skb) {
unsigned long p[7];
int i = 0;
int j = 0;
for (i = payload_offset ; i < (payload_offset + 7) ; i++) {
const int last_index = payload_offset + 7;
for (i = payload_offset ; i < last_index ; i++) {
p[j] = load_byte(skb , i);
j++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment