diff options
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r-- | net/sched/cls_fw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index a1a9f4d26b8c..e3dfbb3046c0 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -334,7 +334,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, | |||
334 | struct fw_head *head = (struct fw_head *)tp->root; | 334 | struct fw_head *head = (struct fw_head *)tp->root; |
335 | struct fw_filter *f = (struct fw_filter*)fh; | 335 | struct fw_filter *f = (struct fw_filter*)fh; |
336 | unsigned char *b = skb_tail_pointer(skb); | 336 | unsigned char *b = skb_tail_pointer(skb); |
337 | struct nlattr *nla; | 337 | struct nlattr *nest; |
338 | 338 | ||
339 | if (f == NULL) | 339 | if (f == NULL) |
340 | return skb->len; | 340 | return skb->len; |
@@ -344,8 +344,9 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, | |||
344 | if (!f->res.classid && !tcf_exts_is_available(&f->exts)) | 344 | if (!f->res.classid && !tcf_exts_is_available(&f->exts)) |
345 | return skb->len; | 345 | return skb->len; |
346 | 346 | ||
347 | nla = (struct nlattr*)b; | 347 | nest = nla_nest_start(skb, TCA_OPTIONS); |
348 | NLA_PUT(skb, TCA_OPTIONS, 0, NULL); | 348 | if (nest == NULL) |
349 | goto nla_put_failure; | ||
349 | 350 | ||
350 | if (f->res.classid) | 351 | if (f->res.classid) |
351 | NLA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid); | 352 | NLA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid); |
@@ -359,7 +360,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, | |||
359 | if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0) | 360 | if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0) |
360 | goto nla_put_failure; | 361 | goto nla_put_failure; |
361 | 362 | ||
362 | nla->nla_len = skb_tail_pointer(skb) - b; | 363 | nla_nest_end(skb, nest); |
363 | 364 | ||
364 | if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) | 365 | if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) |
365 | goto nla_put_failure; | 366 | goto nla_put_failure; |