summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarita patra <saritap@vmware.com>2022-02-28 15:57:47 -0800
committersarita patra <saritap@vmware.com>2022-02-28 15:57:47 -0800
commitd4addb4839d42fc3acce6cd6e1a0f9cc74c14ea7 (patch)
tree7923c1da7455fe7a2a2e7b1684d262aa3289e357
parent5ff968abbed1b0de1239d618717778cb35d6eefd (diff)
pim6d: moving FRR_PIM_AF_XPATH_VAL into pim_nb.h
Signed-off-by: sarita patra <saritap@vmware.com>
-rw-r--r--pimd/pim_addr.h2
-rw-r--r--pimd/pim_nb.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/pimd/pim_addr.h b/pimd/pim_addr.h
index a278a46593..e422a2e2da 100644
--- a/pimd/pim_addr.h
+++ b/pimd/pim_addr.h
@@ -33,7 +33,6 @@ typedef struct in_addr pim_addr;
#define PIM_AFI AFI_IP
#define PIM_MAX_BITLEN IPV4_MAX_BITLEN
#define PIM_AF_NAME "ip"
-#define FRR_PIM_AF_XPATH_VAL "frr-routing:ipv4"
union pimprefixptr {
prefixtype(pimprefixptr, struct prefix, p)
@@ -53,7 +52,6 @@ typedef struct in6_addr pim_addr;
#define PIM_AFI AFI_IP6
#define PIM_MAX_BITLEN IPV6_MAX_BITLEN
#define PIM_AF_NAME "ipv6"
-#define FRR_PIM_AF_XPATH_VAL "frr-routing:ipv6"
union pimprefixptr {
prefixtype(pimprefixptr, struct prefix, p)
diff --git a/pimd/pim_nb.h b/pimd/pim_nb.h
index 72c96d7d73..273c7e8a61 100644
--- a/pimd/pim_nb.h
+++ b/pimd/pim_nb.h
@@ -198,6 +198,12 @@ int lib_interface_gmp_address_family_static_group_destroy(
int routing_control_plane_protocols_name_validate(
struct nb_cb_create_args *args);
+#if PIM_IPV == 4
+#define FRR_PIM_AF_XPATH_VAL "frr-routing:ipv4"
+#else
+#define FRR_PIM_AF_XPATH_VAL "frr-routing:ipv6"
+#endif
+
#define FRR_PIM_VRF_XPATH \
"/frr-routing:routing/control-plane-protocols/" \
"control-plane-protocol[type='%s'][name='%s'][vrf='%s']/" \