Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
a3abb65c
Commit
a3abb65c
authored
Sep 05, 2017
by
yonghong-song
Committed by
GitHub
Sep 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1341 from pbhole/fix_http_filter
examples: fixed http_filter example
parents
ac1334fe
ec60e75c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
examples/networking/http_filter/http-parse-complete.c
examples/networking/http_filter/http-parse-complete.c
+2
-1
examples/networking/http_filter/http-parse-simple.c
examples/networking/http_filter/http-parse-simple.c
+2
-1
No files found.
examples/networking/http_filter/http-parse-complete.c
View file @
a3abb65c
...
...
@@ -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
++
;
}
...
...
examples/networking/http_filter/http-parse-simple.c
View file @
a3abb65c
...
...
@@ -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
++
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment