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
5568a809
Commit
5568a809
authored
Sep 26, 2002
by
Martin Devera
Committed by
David S. Miller
Sep 26, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/sched/sch_htb.c: Verify classid and direct_qlen properly.
parent
b0cb4be7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
net/sched/sch_htb.c
net/sched/sch_htb.c
+6
-0
No files found.
net/sched/sch_htb.c
View file @
5568a809
...
...
@@ -1163,6 +1163,8 @@ static int htb_init(struct Qdisc *sch, struct rtattr *opt)
skb_queue_head_init
(
&
q
->
direct_queue
);
q
->
direct_qlen
=
sch
->
dev
->
tx_queue_len
;
if
(
q
->
direct_qlen
<
2
)
/* some devices have zero tx_queue_len */
q
->
direct_qlen
=
2
;
q
->
timer
.
function
=
htb_timer
;
q
->
timer
.
data
=
(
unsigned
long
)
sch
;
...
...
@@ -1429,6 +1431,10 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
if
(
!
rtab
||
!
ctab
)
goto
failure
;
if
(
!
cl
)
{
/* new class */
/* check for valid classid */
if
(
!
classid
||
TC_H_MAJ
(
classid
^
sch
->
handle
)
||
htb_find
(
classid
,
sch
))
goto
failure
;
/* check maximal depth */
if
(
parent
&&
parent
->
parent
&&
parent
->
parent
->
level
<
2
)
{
printk
(
KERN_ERR
"htb: tree is too deep
\n
"
);
...
...
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