Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
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
iproute2
Commits
1b52a762
Commit
1b52a762
authored
Jan 18, 2005
by
6!tgraf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use NLMSG_TAIL
(Logical change 1.127)
parent
034102f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
tc/m_police.c
tc/m_police.c
+2
-2
tc/q_htb.c
tc/q_htb.c
+4
-4
No files found.
tc/m_police.c
View file @
1b52a762
...
...
@@ -282,7 +282,7 @@ int act_parse_police(struct action_util *a,int *argc_p, char ***argv_p, int tca_
p
.
peakrate
.
mpu
=
mpu
;
}
tail
=
(
struct
rtattr
*
)(((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
)
);
tail
=
NLMSG_TAIL
(
n
);
addattr_l
(
n
,
MAX_MSG
,
tca_id
,
NULL
,
0
);
addattr_l
(
n
,
MAX_MSG
,
TCA_POLICE_TBF
,
&
p
,
sizeof
(
p
));
if
(
p
.
rate
.
rate
)
...
...
@@ -294,7 +294,7 @@ int act_parse_police(struct action_util *a,int *argc_p, char ***argv_p, int tca_
if
(
presult
)
addattr32
(
n
,
MAX_MSG
,
TCA_POLICE_RESULT
,
presult
);
tail
->
rta_len
=
(
((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
))
-
(
void
*
)
tail
;
tail
->
rta_len
=
(
void
*
)
NLMSG_TAIL
(
n
)
-
(
void
*
)
tail
;
res
=
0
;
*
argc_p
=
argc
;
...
...
tc/q_htb.c
View file @
1b52a762
...
...
@@ -93,10 +93,10 @@ static int htb_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nl
}
argc
--
;
argv
++
;
}
tail
=
(
struct
rtattr
*
)(((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
)
);
tail
=
NLMSG_TAIL
(
n
);
addattr_l
(
n
,
1024
,
TCA_OPTIONS
,
NULL
,
0
);
addattr_l
(
n
,
2024
,
TCA_HTB_INIT
,
&
opt
,
NLMSG_ALIGN
(
sizeof
(
opt
)));
tail
->
rta_len
=
(
((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
))
-
(
void
*
)
tail
;
tail
->
rta_len
=
(
void
*
)
NLMSG_TAIL
(
n
)
-
(
void
*
)
tail
;
return
0
;
}
...
...
@@ -224,12 +224,12 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
opt
.
cbuffer
=
tc_calc_xmittime
(
opt
.
ceil
.
rate
,
cbuffer
);
opt
.
ceil
.
cell_log
=
ccell_log
;
tail
=
(
struct
rtattr
*
)(((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
)
);
tail
=
NLMSG_TAIL
(
n
);
addattr_l
(
n
,
1024
,
TCA_OPTIONS
,
NULL
,
0
);
addattr_l
(
n
,
2024
,
TCA_HTB_PARMS
,
&
opt
,
sizeof
(
opt
));
addattr_l
(
n
,
3024
,
TCA_HTB_RTAB
,
rtab
,
1024
);
addattr_l
(
n
,
4024
,
TCA_HTB_CTAB
,
ctab
,
1024
);
tail
->
rta_len
=
(
((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
))
-
(
void
*
)
tail
;
tail
->
rta_len
=
(
void
*
)
NLMSG_TAIL
(
n
)
-
(
void
*
)
tail
;
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