aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vpp/api/api.c2
-rw-r--r--vpp/api/custom_dump.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index c1f7fef6e47..4809a6e5318 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -3454,7 +3454,7 @@ static void vl_api_sr_policy_add_del_t_handler
goto out;
}
- if (!(mp->tunnel_names))
+ if (!(mp->tunnel_names[0]))
{
rv = VNET_API_ERROR_NO_SUCH_NODE2;
goto out;
diff --git a/vpp/api/custom_dump.c b/vpp/api/custom_dump.c
index d0d77f6877e..f77a41cc93f 100644
--- a/vpp/api/custom_dump.c
+++ b/vpp/api/custom_dump.c
@@ -1014,7 +1014,7 @@ static void *vl_api_sr_tunnel_add_del_t_print
s = format (0, "SCRIPT: sr_tunnel_add_del ");
- if (mp->name)
+ if (mp->name[0])
s = format (s, "name %s ", mp->name);
s = format (s, "src %U dst %U/%d ", format_ip6_address,
@@ -1065,7 +1065,7 @@ static void *vl_api_sr_tunnel_add_del_t_print
}
}
- if (mp->policy_name)
+ if (mp->policy_name[0])
s = format (s, "policy_name %s ", mp->policy_name);
if (mp->is_add == 0)
@@ -1082,11 +1082,11 @@ static void *vl_api_sr_policy_add_del_t_print
s = format (0, "SCRIPT: sr_policy_add_del ");
- if (mp->name)
+ if (mp->name[0])
s = format (s, "name %s ", mp->name);
- if (mp->tunnel_names)
+ if (mp->tunnel_names[0])
{
// start deserializing tunnel_names
int num_tunnels = mp->tunnel_names[0]; //number of tunnels
@@ -1110,7 +1110,7 @@ static void *vl_api_sr_policy_add_del_t_print
if (mp->is_add == 0)
s = format (s, "del ");
-
+
FINISH;
}
@@ -1123,16 +1123,16 @@ static void *vl_api_sr_multicast_map_add_del_t_print
s = format (0, "SCRIPT: sr_multicast_map_add_del ");
- if (mp->multicast_address)
- s = format (s, "address %U ", format_ip6_address, &mp->multicast_address);
+ if (mp->multicast_address[0])
+ s = format (s, "address %U ", format_ip6_address, &mp->multicast_address);
- if (mp->policy_name)
+ if (mp->policy_name[0])
s = format (s, "sr-policy %s ", &mp->policy_name);
- if (mp->is_add == 0)
+ if (mp->is_add == 0)
s = format (s, "del ");
-
+
FINISH;
}