X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fsched%2Fem_text.c;h=853c5ead87fd3691c4e699eebb9c6b34bc64f9aa;hb=add93b610a4e66d36d0cf0b2596c3d3bcfdaee39;hp=8ad894b58fcef7223ef9fd16368af81cb36c96d9;hpb=54c66f6d781e03dc0b23956234963c4911e6d1c0;p=linux-2.6-omap-h63xx.git diff --git a/net/sched/em_text.c b/net/sched/em_text.c index 8ad894b58fc..853c5ead87f 100644 --- a/net/sched/em_text.c +++ b/net/sched/em_text.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -119,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; } @@ -151,3 +153,5 @@ MODULE_LICENSE("GPL"); module_init(init_em_text); module_exit(exit_em_text); + +MODULE_ALIAS_TCF_EMATCH(TCF_EM_TEXT);