aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip/lookup.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2016-10-20 13:39:34 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-10-25 15:09:10 +0000
commit948e00ff5eded0806fc7f54e8f3943aade2bd14a (patch)
tree500ed052d71f7ae81d1f8c5a6449e70c0de0aa40 /vnet/vnet/ip/lookup.c
parentdc5aac5c392c977d011233c374154cd83dcebf36 (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 'vnet/vnet/ip/lookup.c')
-rw-r--r--vnet/vnet/ip/lookup.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/vnet/vnet/ip/lookup.c b/vnet/vnet/ip/lookup.c
index 1f8735b54e2..78152f01c04 100644
--- a/vnet/vnet/ip/lookup.c
+++ b/vnet/vnet/ip/lookup.c
@@ -47,6 +47,7 @@
#include <vnet/dpo/classify_dpo.h>
#include <vnet/dpo/punt_dpo.h>
#include <vnet/dpo/receive_dpo.h>
+#include <vnet/dpo/ip_null_dpo.h>
/**
* @file
@@ -278,6 +279,12 @@ static uword unformat_dpo (unformat_input_t * input, va_list * args)
dpo_copy(dpo, punt_dpo_get(proto));
else if (unformat (input, "local"))
receive_dpo_add_or_lock(proto, ~0, NULL, dpo);
+ else if (unformat (input, "null-send-unreach"))
+ ip_null_dpo_add_and_lock(proto, IP_NULL_ACTION_SEND_ICMP_UNREACH, dpo);
+ else if (unformat (input, "null-send-prohibit"))
+ ip_null_dpo_add_and_lock(proto, IP_NULL_ACTION_SEND_ICMP_PROHIBIT, dpo);
+ else if (unformat (input, "null"))
+ ip_null_dpo_add_and_lock(proto, IP_NULL_ACTION_NONE, dpo);
else if (unformat (input, "classify"))
{
u32 classify_table_index;
@@ -337,7 +344,7 @@ vnet_ip_route_cmd (vlib_main_t * vm,
{
unformat_input_t _line_input, * line_input = &_line_input;
fib_route_path_t *rpaths = NULL, rpath;
- dpo_id_t dpo = DPO_NULL, *dpos = NULL;
+ dpo_id_t dpo = DPO_INVALID, *dpos = NULL;
fib_prefix_t *prefixs = NULL, pfx;
clib_error_t * error = NULL;
mpls_label_t out_label;