[NET_SCHED]: Convert classifiers from rtnetlink to new netlink API

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy
2008-01-22 22:11:33 -08:00
committed by David S. Miller
parent 1e90474c37
commit add93b610a
12 changed files with 290 additions and 282 deletions

View File

@ -118,11 +118,14 @@ static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m)
conf.pattern_len = textsearch_get_pattern_len(tm->config);
conf.pad = 0;
RTA_PUT_NOHDR(skb, sizeof(conf), &conf);
RTA_APPEND(skb, conf.pattern_len, textsearch_get_pattern(tm->config));
if (nla_put_nohdr(skb, sizeof(conf), &conf) < 0)
goto nla_put_failure;
if (nla_append(skb, conf.pattern_len,
textsearch_get_pattern(tm->config)) < 0)
goto nla_put_failure;
return 0;
rtattr_failure:
nla_put_failure:
return -1;
}