X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Flearn.c;h=ab403bee5686f6d17c6f95a546a8a75ddbd8fcda;hb=dd43a558597bbf99a62541bc77e85f86f63e2f12;hp=b9bbc973e6bddb1e8fdde00a9eaed097999ac6e0;hpb=b019d34da6e6c185bb093984906adcb36c3f6686;p=sliver-openvswitch.git diff --git a/lib/learn.c b/lib/learn.c index b9bbc973e..ab403bee5 100644 --- a/lib/learn.c +++ b/lib/learn.c @@ -512,14 +512,13 @@ learn_parse_spec(const char *orig, char *name, char *value, * * Modifies 'arg'. */ void -learn_parse(char *arg, const struct flow *flow, struct ofpbuf *ofpacts) +learn_parse(char *arg, struct ofpbuf *ofpacts) { char *orig = xstrdup(arg); char *name, *value; struct ofpact_learn *learn; struct match match; - enum ofperr error; learn = ofpact_put_LEARN(ofpacts); learn->idle_timeout = OFP_FLOW_PERMANENT; @@ -556,21 +555,6 @@ learn_parse(char *arg, const struct flow *flow, struct ofpbuf *ofpacts) learn_parse_spec(orig, name, value, spec); - /* Check prerequisites. */ - if (spec->src_type == NX_LEARN_SRC_FIELD - && flow && !mf_are_prereqs_ok(spec->src.field, flow)) { - ovs_fatal(0, "%s: cannot specify source field %s because " - "prerequisites are not satisfied", - orig, spec->src.field->name); - } - if ((spec->dst_type == NX_LEARN_DST_MATCH - || spec->dst_type == NX_LEARN_DST_LOAD) - && !mf_are_prereqs_ok(spec->dst.field, &match.flow)) { - ovs_fatal(0, "%s: cannot specify destination field %s because " - "prerequisites are not satisfied", - orig, spec->dst.field->name); - } - /* Update 'match' to allow for satisfying destination * prerequisites. */ if (spec->src_type == NX_LEARN_SRC_IMMEDIATE @@ -581,13 +565,6 @@ learn_parse(char *arg, const struct flow *flow, struct ofpbuf *ofpacts) } ofpact_update_len(ofpacts, &learn->ofpact); - /* In theory the above should have caught any errors, but... */ - if (flow) { - error = learn_check(learn, flow); - if (error) { - ovs_fatal(0, "%s: %s", orig, ofperr_to_string(error)); - } - } free(orig); }