-#ifdef CONFIG_NET_CLS_ACT
- if (tb[TCA_FW_POLICE-1]) {
- act = kmalloc(sizeof(*act),GFP_KERNEL);
- if (NULL == act)
- return -ENOMEM;
-
- memset(act,0,sizeof(*act));
- ret = tcf_action_init_1(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1] ,act,"police",TCA_ACT_NOREPLACE,TCA_ACT_BIND);
- if (0 > ret){
- tcf_action_destroy(act,TCA_ACT_UNBIND);
- return ret;
- }
- act->type = TCA_OLD_COMPAT;
-
- sch_tree_lock(tp->q);
- act = xchg(&f->action, act);
- sch_tree_unlock(tp->q);
-
- tcf_action_destroy(act,TCA_ACT_UNBIND);
-
- }
-
- if(tb[TCA_FW_ACT-1]) {
- act = kmalloc(sizeof(*act),GFP_KERNEL);
- if (NULL == act)
- return -ENOMEM;
- memset(act,0,sizeof(*act));
- ret = tcf_action_init(tb[TCA_FW_ACT-1], tca[TCA_RATE-1],act,NULL, TCA_ACT_NOREPLACE,TCA_ACT_BIND);
- if (0 > ret) {
- tcf_action_destroy(act,TCA_ACT_UNBIND);
- return ret;
- }
-
- sch_tree_lock(tp->q);
- act = xchg(&f->action, act);
- sch_tree_unlock(tp->q);
-
- tcf_action_destroy(act,TCA_ACT_UNBIND);
- }
-#ifdef CONFIG_NET_CLS_IND
- if(tb[TCA_FW_INDEV-1]) {
- struct rtattr *idev = tb[TCA_FW_INDEV-1];
- if (RTA_PAYLOAD(idev) >= IFNAMSIZ) {
- printk("cls_fw: bad indev name %s\n",(char*)RTA_DATA(idev));
- err = -EINVAL;
- goto errout;
- }
- memset(f->indev,0,IFNAMSIZ);
- sprintf(f->indev, "%s", (char*)RTA_DATA(idev));
- }
-#endif
-#else /* only POLICE defined */