Patch "openvswitch: get related ct labels from its master if it is not confirmed" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    openvswitch: get related ct labels from its master if it is not confirmed

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     openvswitch-get-related-ct-labels-from-its-master-if.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b81dec663584bf81c26a49e2a50ef80425e87485
Author: Xin Long <lucien.xin@xxxxxxxxx>
Date:   Wed Jun 19 18:08:56 2024 -0400

    openvswitch: get related ct labels from its master if it is not confirmed
    
    [ Upstream commit a23ac973f67f37e77b3c634e8b1ad5b0164fcc1f ]
    
    Ilya found a failure in running check-kernel tests with at_groups=144
    (144: conntrack - FTP SNAT orig tuple) in OVS repo. After his further
    investigation, the root cause is that the labels sent to userspace
    for related ct are incorrect.
    
    The labels for unconfirmed related ct should use its master's labels.
    However, the changes made in commit 8c8b73320805 ("openvswitch: set
    IPS_CONFIRMED in tmpl status only when commit is set in conntrack")
    led to getting labels from this related ct.
    
    So fix it in ovs_ct_get_labels() by changing to copy labels from its
    master ct if it is a unconfirmed related ct. Note that there is no
    fix needed for ct->mark, as it was already copied from its master
    ct for related ct in init_conntrack().
    
    Fixes: 8c8b73320805 ("openvswitch: set IPS_CONFIRMED in tmpl status only when commit is set in conntrack")
    Reported-by: Ilya Maximets <i.maximets@xxxxxxx>
    Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx>
    Reviewed-by: Ilya Maximets <i.maximets@xxxxxxx>
    Tested-by: Ilya Maximets <i.maximets@xxxxxxx>
    Reviewed-by: Aaron Conole <aconole@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 2928c142a2ddb..3b980bf2770bb 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -168,8 +168,13 @@ static u32 ovs_ct_get_mark(const struct nf_conn *ct)
 static void ovs_ct_get_labels(const struct nf_conn *ct,
 			      struct ovs_key_ct_labels *labels)
 {
-	struct nf_conn_labels *cl = ct ? nf_ct_labels_find(ct) : NULL;
+	struct nf_conn_labels *cl = NULL;
 
+	if (ct) {
+		if (ct->master && !nf_ct_is_confirmed(ct))
+			ct = ct->master;
+		cl = nf_ct_labels_find(ct);
+	}
 	if (cl)
 		memcpy(labels, cl->bits, OVS_CT_LABELS_LEN);
 	else




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux