Commit 1375951552 for frr

commit 1375951552d836d953298baa6cd8fccea26870cf
Author: Philippe Guibert <philippe.guibert@6wind.com>
Date:   Fri Apr 19 08:30:06 2024 +0200

    pceplib: use define value for segment routing path setup type

    Use the SR_TE_PST define instead of relying on an hardset value.

    In the path setup type capability test, the other PST values are
    PCECC (2, rfc9050) and SRv6 (3, rfc9603), which are not supported by
    pceplib: they are only used to check the order of the encoded PSTs.
    Add a comment to explain it.

    Fixes: 749714731ee9 ("pceplib: Integrate pcelib into frr")
    Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>

diff --git a/pceplib/pcep_msg_tlvs.h b/pceplib/pcep_msg_tlvs.h
index 41185583d0..75d06c2ae2 100644
--- a/pceplib/pcep_msg_tlvs.h
+++ b/pceplib/pcep_msg_tlvs.h
@@ -185,7 +185,7 @@ struct pcep_object_tlv_lsp_error_code {
 };

 /* Path Setup Type TLV, Used in RP and SRP Object. RFCs: 8408,
- * draft-ietf-pce-segment-routing-16 */
+ * rfc8664 */
 #define SR_TE_PST 1

 struct pcep_object_tlv_path_setup_type {
diff --git a/pceplib/test/pcep_msg_tlvs_test.c b/pceplib/test/pcep_msg_tlvs_test.c
index 2f331ee6fb..020fb55e0e 100644
--- a/pceplib/test/pcep_msg_tlvs_test.c
+++ b/pceplib/test/pcep_msg_tlvs_test.c
@@ -198,11 +198,14 @@ void test_pcep_tlv_create_path_setup_type_capability(void)
 	if (tlv != NULL)
 		pcep_obj_free_tlv(&tlv->header);

-	/* Test only populating the pst list */
+	/* Test only populating the pst list.
+	 * PCECC (2, rfc9050) and SRv6 (3, rfc9603) are not supported by
+	 * pceplib, they are only used to check the order of the PSTs.
+	 */
 	uint8_t *pst1 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
 	uint8_t *pst2 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
 	uint8_t *pst3 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
-	*pst1 = 1;
+	*pst1 = SR_TE_PST;
 	*pst2 = 2;
 	*pst3 = 3;
 	dll_append(pst_list, pst1);
@@ -237,7 +240,7 @@ void test_pcep_tlv_create_path_setup_type_capability(void)
 	sub_tlv_list = dll_initialize();
 	pst1 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
 	pst2 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
-	*pst1 = 1;
+	*pst1 = SR_TE_PST;
 	*pst2 = 2;
 	dll_append(pst_list, pst1);
 	dll_append(pst_list, pst2);
@@ -306,7 +309,7 @@ void test_pcep_tlv_create_path_setup_type_capability(void)

 	pst1 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
 	pst2 = pceplib_malloc(PCEPLIB_MESSAGES, 1);
-	*pst1 = 1;
+	*pst1 = SR_TE_PST;
 	*pst2 = 2;
 	dll_append(pst_list, pst1);
 	dll_append(pst_list, pst2);