On 7/20/23 14:57, Ales Musil wrote:
> The affinity code was differentiating between force_snat
> and skip snat. However, if both parameters were set at the
> same time the force_snat would be preferred, which shouldn't
> be the case.
>
> Make sure the skip_snat is preferred if both parameters are
> present.
>
> Fixes: d3926b433e44 ("northd: rely on new actions for lb affinity")
> Reported-at: https://bugzilla.redhat.com/2224260
> Signed-off-by: Ales Musil <[email protected]>
> ---
Thanks, Ales!
> northd/northd.c | 53 ++++++++++++++++-----------------------------
> tests/ovn-northd.at | 20 +++++++++++++++++
> 2 files changed, 39 insertions(+), 34 deletions(-)
>
> diff --git a/northd/northd.c b/northd/northd.c
> index b9605862e..6fac13d00 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -11478,6 +11478,11 @@ build_lrouter_nat_flows_for_lb(struct ovn_lb_vip
> *lb_vip,
> {
> bool ipv4 = lb_vip->address_family == AF_INET;
> const char *ip_match = ipv4 ? "ip4" : "ip6";
> + char *aff_action[LROUTER_NAT_LB_FLOW_MAX] = {
> + NULL,
> + "flags.skip_snat_for_lb = 1; ",
> + "flags.force_snat_for_lb = 1; "
> + };
I changed this to the equivalent:
char *aff_action[LROUTER_NAT_LB_FLOW_MAX] = {
[LROUTER_NAT_LB_FLOW_SKIP_SNAT] = "flags.skip_snat_for_lb = 1; ",
[LROUTER_NAT_LB_FLOW_FORCE_SNAT] = "flags.force_snat_for_lb = 1; ",
};
and then applied the patch to main and backported it to 23.06 and 23.03.
Older branches need a custom backport so if you need it on <=22.12 could
you please prepare a separate patch?
Thanks,
Dumitru
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev