--- a/net/sched/act_api.c 2005/01/16 14:05:37 1.2 +++ b/net/sched/act_api.c 2005/01/16 14:22:47 @@ -308,7 +308,7 @@ */ if (a_o != NULL) { *err = -EAGAIN; - goto err_mod; + goto err_out; } #endif goto err_out; @@ -361,9 +361,13 @@ } for (i=0; i < TCA_ACT_MAX_PRIO && tb[i]; i++) { +replay: act = tcf_action_init_1(tb[i], est, name, ovr, bind, err); - if (act == NULL) - goto err; + if (act == NULL) { + if (*err == -EAGAIN) + goto replay; + goto err_out; + } act->order = i+1; if (head == NULL) @@ -374,7 +378,7 @@ } return head; -err: +err_out: if (head != NULL) tcf_action_destroy(head, bind); return NULL; @@ -752,10 +756,7 @@ */ if (n->nlmsg_flags&NLM_F_REPLACE) ovr = 1; -replay: ret = tcf_action_add(tca[TCA_ACT_TAB-1], n, pid, ovr); - if (ret == -EAGAIN) - goto replay; break; case RTM_DELACTION: ret = tca_action_gd(tca[TCA_ACT_TAB-1], n, pid, RTM_DELACTION); --- a/net/sched/cls_api.c 2005/01/16 14:09:39 1.1 +++ b/net/sched/cls_api.c 2005/01/16 14:20:41 @@ -486,14 +486,19 @@ memset(exts, 0, sizeof(*exts)); #ifdef CONFIG_NET_CLS_ACT + { int err; struct tc_action *act; if (map->police && tb[map->police-1]) { +replay: act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police", TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err); - if (act == NULL) - return err; + if (act == NULL) { + if (err == -EAGAIN) + goto replay; + return err; + } act->type = TCA_OLD_COMPAT; exts->action = act; @@ -505,6 +510,7 @@ exts->action = act; } + } #elif defined CONFIG_NET_CLS_POLICE if (map->police && tb[map->police-1]) { struct tcf_police *p;