diff options
author | Chris Luke <chrisy@flirble.org> | 2016-05-27 12:11:24 -0400 |
---|---|---|
committer | Chris Luke <chrisy@flirble.org> | 2016-05-27 12:11:24 -0400 |
commit | f090a30eef3c4b47b294578209162c9d686159c9 (patch) | |
tree | 99a921a9b4f537ba8aa82f17d8bf964d845f8145 | |
parent | edc40dbda064094109bb4c214d2f849435f86596 (diff) |
VPP-95 VXLAN add_del API intermittent failure
The VXLAN add_del API sometimes rejects calls with
VNET_API_ERROR_SAME_SRC_DST when the two parameters are obviously
different. This is because the API code is checking the "is_ip6" flag in
a not-yet initialized area of memory leading to random results.
Also fix help text for vxlan_add_del_tunnel in vat.
This does not change the API; it repairs intermittent failure.
Change-Id: I41863694f478c1f669078f82f69d8cca4841c989
Signed-off-by: Chris Luke <chrisy@flirble.org>
-rw-r--r-- | vpp-api-test/vat/api_format.c | 2 | ||||
-rw-r--r-- | vpp/api/api.c | 4 |
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 a685f0a28c4..76c068fdaee 100644 --- a/vpp-api-test/vat/api_format.c +++ b/vpp-api-test/vat/api_format.c @@ -10713,7 +10713,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 f81b9c98af3..ae8ddf9de13 100644 --- a/vpp/api/api.c +++ b/vpp/api/api.c @@ -4325,8 +4325,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; } |