aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vpp-api-test/vat/api_format.c2
-rw-r--r--vpp/api/api.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index 59da077e053..258e314bab2 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -11051,7 +11051,7 @@ _(l2tpv3_set_lookup_key, \
"lookup_v6_src | lookup_v6_dst | lookup_session_id") \
_(sw_if_l2tpv3_tunnel_dump, "") \
_(vxlan_add_del_tunnel, \
- "src <ip4-addr> dst <ip4-addr> vni <vni> [encap-vrf-id <nn>]\n" \
+ "src <ip-addr> dst <ip-addr> vni <vni> [encap-vrf-id <nn>]\n" \
" [decap-next l2|ip4|ip6] [del]") \
_(vxlan_tunnel_dump, "[<intfc> | sw_if_index <nn>]") \
_(gre_add_del_tunnel, \
diff --git a/vpp/api/api.c b/vpp/api/api.c
index 8b801e5a5c0..52d0b2d21ba 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -4330,8 +4330,8 @@ static void vl_api_vxlan_add_del_tunnel_t_handler
encap_fib_index = p[0];
/* Check src & dst are different */
- if ((a->is_ip6 && memcmp(mp->src_address, mp->dst_address, 16) == 0) ||
- (!a->is_ip6 && memcmp(mp->src_address, mp->dst_address, 4) == 0)) {
+ if ((mp->is_ipv6 && memcmp(mp->src_address, mp->dst_address, 16) == 0) ||
+ (!mp->is_ipv6 && memcmp(mp->src_address, mp->dst_address, 4) == 0)) {
rv = VNET_API_ERROR_SAME_SRC_DST;
goto out;
}