diff options
author | Hongjun Ni <hongjun.ni@intel.com> | 2017-03-27 20:09:32 +0800 |
---|---|---|
committer | Hongjun Ni <hongjun.ni@intel.com> | 2017-03-27 20:09:32 +0800 |
commit | e2f879c3c98a2c4cbce9cde9a2676e55d09904fd (patch) | |
tree | 78e3012ca97327625816efa73467e8e0c7960afb /nsh-plugin/nsh | |
parent | aa609dfe9072323483c8c0a95460b1be4ca05383 (diff) |
Fix MD2's api issue for hc2vppv17.07-rc0
Change-Id: Ibdeb1eac87d2253c3735be3733cdf8ae2f90b763
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh-plugin/nsh')
-rw-r--r-- | nsh-plugin/nsh/nsh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c index 6ff60c8..bfa75fd 100644 --- a/nsh-plugin/nsh/nsh.c +++ b/nsh-plugin/nsh/nsh.c @@ -1211,11 +1211,10 @@ static void vl_api_nsh_add_del_entry_t_handler } else if (mp->md_type == 2) { - vec_free(a->nsh_entry.tlvs_data); tlvs_len = mp->tlv_length; vec_validate_aligned (data, tlvs_len-1, CLIB_CACHE_LINE_BYTES); - clib_memcpy(data, a->nsh_entry.tlvs_data, tlvs_len); + clib_memcpy(data, mp->tlv, tlvs_len); a->nsh_entry.tlvs_data = data; a->nsh_entry.tlvs_len = tlvs_len; } @@ -1254,7 +1253,8 @@ static void send_nsh_entry_details } else if (t->nsh_base.md_type == 2) { - /* TBD */ + rmp->tlv_length = t->tlvs_len; + clib_memcpy(rmp->tlv, t->tlvs_data, t->tlvs_len); } rmp->context = context; |