[ovs-dev] [PATCH] ovn-controller: Fix conntrack zone in gateway routers.

Ben Pfaff blp at ovn.org
Tue Dec 20 05:26:34 UTC 2016


On Mon, Dec 19, 2016 at 04:12:17AM -0800, Gurucharan Shetty wrote:
> The gateway router was using the ct_next action to
> reassemble packets.  But ct_next action by default would
> use the zone allocated for a logical port and in case of
> gateway routers that value was zero.  This would make
> the flow use the default zone of zero.  This had some
> unintended consequences as the zone used to track packets
> and the zone used to eventually commit it (DNAT zone)
> was different.  As a result, a packet would never have ct.est set.
> 
> With this commit, when ct_next action is used in a gateway
> router, we use the DNAT zone.  This is similar to the
> strategy used in commit c2e954a117a8 (ovn-controller: Datapath
> based conntrack zone for load-balancing.)
> 
> Signed-off-by: Gurucharan Shetty <guru at ovn.org>

Seems reasonable.

> -    ct->zone_src.field = mf_from_id(MFF_LOG_CT_ZONE);
> +    ct->zone_src.field = ep->is_switch ? mf_from_id(MFF_LOG_CT_ZONE)
> +                            : mf_from_id(MFF_LOG_DNAT_ZONE);

You could put the ?: inside the mf_from_id().

Acked-by: Ben Pfaff <blp at ovn.org>


More information about the dev mailing list