Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
linux
Commits
4ccd8953
Commit
4ccd8953
authored
Sep 14, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETFILTER]: Fix tcp_find_option() bug properly.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
4dadf5b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ip_tables.c
+5
-2
No files found.
net/ipv4/netfilter/ip_tables.c
View file @
4ccd8953
...
@@ -1464,8 +1464,11 @@ tcp_find_option(u_int8_t option,
...
@@ -1464,8 +1464,11 @@ tcp_find_option(u_int8_t option,
unsigned
int
i
;
unsigned
int
i
;
duprintf
(
"tcp_match: finding option
\n
"
);
duprintf
(
"tcp_match: finding option
\n
"
);
if
(
!
optlen
)
return
invert
;
/* If we don't have the whole header, drop packet. */
/* If we don't have the whole header, drop packet. */
BUG_ON
(
!
optlen
);
op
=
skb_header_pointer
(
skb
,
op
=
skb_header_pointer
(
skb
,
skb
->
nh
.
iph
->
ihl
*
4
+
sizeof
(
struct
tcphdr
),
skb
->
nh
.
iph
->
ihl
*
4
+
sizeof
(
struct
tcphdr
),
optlen
,
_opt
);
optlen
,
_opt
);
...
@@ -1534,7 +1537,7 @@ tcp_match(const struct sk_buff *skb,
...
@@ -1534,7 +1537,7 @@ tcp_match(const struct sk_buff *skb,
IPT_TCP_INV_FLAGS
))
IPT_TCP_INV_FLAGS
))
return
0
;
return
0
;
if
(
tcpinfo
->
option
)
{
if
(
tcpinfo
->
option
)
{
if
(
th
->
doff
*
4
<
=
sizeof
(
_tcph
))
{
if
(
th
->
doff
*
4
<
sizeof
(
_tcph
))
{
*
hotdrop
=
1
;
*
hotdrop
=
1
;
return
0
;
return
0
;
}
}
...
...
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