diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-09-27 14:45:34 -0700 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-09-27 14:45:34 -0700 |
commit | ed26e3ea9995ba632e681d5990af5ee9814f650e (patch) | |
tree | ceb660492cc026eddcf15a74d4e24fae5f026cd5 /lib | |
parent | 8b6d097c84018b1b4f96150407d6d029905a631e (diff) | |
download | openvswitch-ed26e3ea9995ba632e681d5990af5ee9814f650e.tar.gz |
ofp-actions: Always consider inconsistent CT actions as an error.
We can't downgrade to OF1.0 and expect inconsistent CT actions
be silently discarded. Instead, datapath flow install fails, so
it is better to flag inconsistent CT actions as hard errors.
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ofp-actions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index f896f98d4..15dbdec8d 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -7033,7 +7033,10 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a, if (!dl_type_is_ip_any(flow->dl_type) || (flow->ct_state & CS_INVALID && oc->flags & NX_CT_F_COMMIT) || (oc->alg == IPPORT_FTP && flow->nw_proto != IPPROTO_TCP)) { - inconsistent_match(usable_protocols); + /* We can't downgrade to OF1.0 and expect inconsistent CT actions + * be silently discarded. Instead, datapath flow install fails, so + * it is better to flag inconsistent CT actions as hard errors. */ + return OFPERR_OFPBAC_MATCH_INCONSISTENT; } if (oc->zone_src.field) { @@ -7052,7 +7055,7 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a, (on->range_af == AF_INET && flow->dl_type != htons(ETH_TYPE_IP)) || (on->range_af == AF_INET6 && flow->dl_type != htons(ETH_TYPE_IPV6))) { - inconsistent_match(usable_protocols); + return OFPERR_OFPBAC_MATCH_INCONSISTENT; } return 0; } |