diff options
author | Neale Ranns <nranns@cisco.com> | 2016-10-20 13:39:34 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-10-25 15:09:10 +0000 |
commit | 948e00ff5eded0806fc7f54e8f3943aade2bd14a (patch) | |
tree | 500ed052d71f7ae81d1f8c5a6449e70c0de0aa40 /vpp-api-test/vat | |
parent | dc5aac5c392c977d011233c374154cd83dcebf36 (diff) |
Support IETF routing Yang models (VPP-503).
Add support for special routes to send ICMP unreachable or admin prohibited.
Change-Id: Ia1ac65b0e5e925c0f9ebc7824141833b4e18f05e
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vpp-api-test/vat')
-rw-r--r-- | vpp-api-test/vat/api_format.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c index 51beada2bd0..6f11083844b 100644 --- a/vpp-api-test/vat/api_format.c +++ b/vpp-api-test/vat/api_format.c @@ -5757,6 +5757,7 @@ api_ip_add_del_route (vat_main_t * vam) u8 sw_if_index_set = 0; u8 is_ipv6 = 0; u8 is_local = 0, is_drop = 0; + u8 is_unreach = 0, is_prohibit = 0; u8 create_vrf_if_needed = 0; u8 is_add = 1; u8 next_hop_weight = 1; @@ -5822,6 +5823,14 @@ api_ip_add_del_route (vat_main_t * vam) { is_drop = 1; } + else if (unformat (i, "null-send-unreach")) + { + is_unreach = 1; + } + else if (unformat (i, "null-send-prohibit")) + { + is_prohibit = 1; + } else if (unformat (i, "local")) { is_local = 1; @@ -5871,9 +5880,11 @@ api_ip_add_del_route (vat_main_t * vam) return -99; } - if (!next_hop_set && !is_drop && !is_local && !is_classify) + if (!next_hop_set && !is_drop && !is_local && + !is_classify && !is_unreach && !is_prohibit) { - errmsg ("next hop / local / drop / classify not set\n"); + errmsg + ("next hop / local / drop / unreach / prohibit / classify not set\n"); return -99; } @@ -5936,6 +5947,8 @@ api_ip_add_del_route (vat_main_t * vam) mp->is_add = is_add; mp->is_drop = is_drop; + mp->is_unreach = is_unreach; + mp->is_prohibit = is_prohibit; mp->is_ipv6 = is_ipv6; mp->is_local = is_local; mp->is_classify = is_classify; |