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
95303370
Commit
95303370
authored
Dec 07, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PKT_SCHED]: Do not dereference the special pointer value 'HTB_DIRECT'.
Based upon a patch from devik.
parent
8255b244
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
net/sched/sch_htb.c
net/sched/sch_htb.c
+7
-2
No files found.
net/sched/sch_htb.c
View file @
95303370
...
...
@@ -290,6 +290,11 @@ static __inline__ struct htb_class *htb_find(u32 handle, struct Qdisc *sch)
* then finish and return direct queue.
*/
#define HTB_DIRECT (struct htb_class*)-1
static
inline
u32
htb_classid
(
struct
htb_class
*
cl
)
{
return
(
cl
&&
cl
!=
HTB_DIRECT
)
?
cl
->
classid
:
TC_H_UNSPEC
;
}
static
struct
htb_class
*
htb_classify
(
struct
sk_buff
*
skb
,
struct
Qdisc
*
sch
)
{
struct
htb_sched
*
q
=
(
struct
htb_sched
*
)
sch
->
data
;
...
...
@@ -703,7 +708,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
sch
->
q
.
qlen
++
;
sch
->
stats
.
packets
++
;
sch
->
stats
.
bytes
+=
skb
->
len
;
HTB_DBG
(
1
,
1
,
"htb_enq_ok cl=%X skb=%p
\n
"
,
cl
?
cl
->
classid
:
0
,
skb
);
HTB_DBG
(
1
,
1
,
"htb_enq_ok cl=%X skb=%p
\n
"
,
htb_classid
(
cl
)
,
skb
);
return
NET_XMIT_SUCCESS
;
}
...
...
@@ -731,7 +736,7 @@ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch)
htb_activate
(
q
,
cl
);
sch
->
q
.
qlen
++
;
HTB_DBG
(
1
,
1
,
"htb_req_ok cl=%X skb=%p
\n
"
,
cl
?
cl
->
classid
:
0
,
skb
);
HTB_DBG
(
1
,
1
,
"htb_req_ok cl=%X skb=%p
\n
"
,
htb_classid
(
cl
)
,
skb
);
return
NET_XMIT_SUCCESS
;
}
...
...
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