On 28 October 2015 at 20:07, Jarno Rajahalme <jrajaha...@nicira.com> wrote:
> Restrictions from embedded actions should be folded in rather than discarded.
>
> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>

Thanks for catching this, one comment below.

Acked-by: Joe Stringer <joestrin...@nicira.com>

> @@ -6152,6 +6158,7 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, 
> struct ofpact *a,
>      case OFPACT_CT: {
>          struct ofpact_conntrack *oc = ofpact_get_CT(a);
>          enum ofputil_protocol p = *usable_protocols;
> +        enum ofperr err;
>
>          if (!dl_type_is_ip_any(flow->dl_type)
>              || (flow->ct_state & CS_INVALID && oc->flags & NX_CT_F_COMMIT)) {
> @@ -6162,8 +6169,10 @@ ofpact_check__(enum ofputil_protocol 
> *usable_protocols, struct ofpact *a,
>              return mf_check_src(&oc->zone_src, flow);
>          }
>
> -        return ofpacts_check(oc->actions, ofpact_ct_get_action_len(oc),
> -                             flow, max_ports, table_id, n_tables, &p);
> +        err = ofpacts_check(oc->actions, ofpact_ct_get_action_len(oc),
> +                            flow, max_ports, table_id, n_tables, &p);
> +        *usable_protocols &= p;   /* Fold any new restrictions back. */
> +        return err;
>      }

I think 'p' should probably just be removed, and pass usable_protocols directly?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to