summaryrefslogtreecommitdiffstats
path: root/tc/f_u32.c
diff options
context:
space:
mode:
author8!tgraf <8!tgraf>2005-01-18 01:24:18 +0000
committer8!tgraf <8!tgraf>2005-01-18 01:24:18 +0000
commit4a86fe19bc7f125d3eb40366277f87da4cda78dd (patch)
tree51e4bf028dcfd2160e0eeb4e216bef99ba27992e /tc/f_u32.c
parent1b52a7622ea8eda9980ce2dbe984985ac092d92a (diff)
Use NLMSG_TAIL
(Logical change 1.127)
Diffstat (limited to 'tc/f_u32.c')
-rw-r--r--tc/f_u32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 1d96d63f..118225dc 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -794,7 +794,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle, int argc, char **
if (argc == 0)
return 0;
- tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, MAX_MSG, TCA_OPTIONS, NULL, 0);
while (argc > 0) {
@@ -943,7 +943,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle, int argc, char **
addattr_l(n, MAX_MSG, TCA_U32_HASH, &htid, 4);
if (sel_ok)
addattr_l(n, MAX_MSG, TCA_U32_SEL, &sel, sizeof(sel.sel)+sel.sel.nkeys*sizeof(struct tc_u32_key));
- tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}