X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6_forward.c;h=fc71c3d2d97ea962095dc86efe2ff14d3e68e612;hb=815d7d5637fbffd20bf81c74fd59dac8e4fe4d94;hp=a14bf09742b2add369f9252184217d613fed7a53;hpb=2eeeb4b1706150f69402dd8afc43856f801cd89a;p=vpp.git diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index a14bf09742b..fc71c3d2d97 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -436,11 +436,11 @@ ip6_sw_interface_enable_disable (u32 sw_if_index, u32 is_enable) return; } - vnet_feature_enable_disable ("ip6-unicast", "ip6-drop", sw_if_index, + vnet_feature_enable_disable ("ip6-unicast", "ip6-not-enabled", sw_if_index, !is_enable, 0, 0); - vnet_feature_enable_disable ("ip6-multicast", "ip6-drop", sw_if_index, - !is_enable, 0, 0); + vnet_feature_enable_disable ("ip6-multicast", "ip6-not-enabled", + sw_if_index, !is_enable, 0, 0); } /* get first interface address */ @@ -622,10 +622,10 @@ VNET_FEATURE_INIT (ip6_vxlan_bypass, static) = .runs_before = VNET_FEATURES ("ip6-lookup"), }; -VNET_FEATURE_INIT (ip6_drop, static) = +VNET_FEATURE_INIT (ip6_not_enabled, static) = { .arc_name = "ip6-unicast", - .node_name = "ip6-drop", + .node_name = "ip6-not-enabled", .runs_before = VNET_FEATURES ("ip6-lookup"), }; @@ -650,9 +650,9 @@ VNET_FEATURE_INIT (ip6_vpath_mc, static) = { .runs_before = VNET_FEATURES ("ip6-mfib-forward-lookup"), }; -VNET_FEATURE_INIT (ip6_drop_mc, static) = { +VNET_FEATURE_INIT (ip6_not_enabled_mc, static) = { .arc_name = "ip6-multicast", - .node_name = "ip6-drop", + .node_name = "ip6-not-enabled", .runs_before = VNET_FEATURES ("ip6-mfib-forward-lookup"), }; @@ -666,10 +666,16 @@ VNET_FEATURE_INIT (ip6_mc_lookup, static) = { VNET_FEATURE_ARC_INIT (ip6_output, static) = { .arc_name = "ip6-output", - .start_nodes = VNET_FEATURES ("ip6-rewrite", "ip6-midchain"), + .start_nodes = VNET_FEATURES ("ip6-rewrite", "ip6-midchain", "ip6-dvr-dpo"), .arc_index_ptr = &ip6_main.lookup_main.output_feature_arc_index, }; +VNET_FEATURE_INIT (ip6_outacl, static) = { + .arc_name = "ip6-output", + .node_name = "ip6-outacl", + .runs_before = VNET_FEATURES ("ipsec-output-ip6"), +}; + VNET_FEATURE_INIT (ip6_ipsec_output, static) = { .arc_name = "ip6-output", .node_name = "ipsec-output-ip6", @@ -711,11 +717,11 @@ ip6_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) ip6_mfib_interface_enable_disable (sw_if_index, 0); } - vnet_feature_enable_disable ("ip6-unicast", "ip6-drop", sw_if_index, + vnet_feature_enable_disable ("ip6-unicast", "ip6-not-enabled", sw_if_index, is_add, 0, 0); - vnet_feature_enable_disable ("ip6-multicast", "ip6-drop", sw_if_index, - is_add, 0, 0); + vnet_feature_enable_disable ("ip6-multicast", "ip6-not-enabled", + sw_if_index, is_add, 0, 0); return /* no error */ 0; } @@ -1578,6 +1584,7 @@ ip6_local_inline (vlib_main_t * vm, vlib_node_runtime_t * node, next0 = lm->local_next_by_ip_protocol[ip0->protocol]; next0 = error0 != IP6_ERROR_UNKNOWN_PROTOCOL ? IP_LOCAL_NEXT_DROP : next0; + p0->error = error_node->errors[error0]; if (head_of_feature_arc) @@ -1619,6 +1626,7 @@ VLIB_REGISTER_NODE (ip6_local_node, static) = [IP_LOCAL_NEXT_PUNT] = "ip6-punt", [IP_LOCAL_NEXT_UDP_LOOKUP] = "ip6-udp-lookup", [IP_LOCAL_NEXT_ICMP] = "ip6-icmp-input", + [IP_LOCAL_NEXT_REASSEMBLY] = "ip6-reassembly", }, }; /* *INDENT-ON* */ @@ -1902,7 +1910,7 @@ VLIB_REGISTER_NODE (ip6_discover_neighbor_node) = .n_next_nodes = IP6_DISCOVER_NEIGHBOR_N_NEXT, .next_nodes = { - [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "error-drop", + [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "ip6-drop", [IP6_DISCOVER_NEIGHBOR_NEXT_REPLY_TX] = "interface-output", }, }; @@ -1920,7 +1928,7 @@ VLIB_REGISTER_NODE (ip6_glean_node) = .n_next_nodes = IP6_DISCOVER_NEIGHBOR_N_NEXT, .next_nodes = { - [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "error-drop", + [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "ip6-drop", [IP6_DISCOVER_NEIGHBOR_NEXT_REPLY_TX] = "interface-output", }, }; @@ -2229,8 +2237,10 @@ ip6_rewrite_inline (vlib_main_t * vm, if (is_midchain) { - adj0->sub_type.midchain.fixup_func (vm, adj0, p0); - adj1->sub_type.midchain.fixup_func (vm, adj1, p1); + adj0->sub_type.midchain.fixup_func + (vm, adj0, p0, adj0->sub_type.midchain.fixup_data); + adj1->sub_type.midchain.fixup_func + (vm, adj1, p1, adj1->sub_type.midchain.fixup_data); } if (is_mcast) { @@ -2340,7 +2350,8 @@ ip6_rewrite_inline (vlib_main_t * vm, if (is_midchain) { - adj0->sub_type.midchain.fixup_func (vm, adj0, p0); + adj0->sub_type.midchain.fixup_func + (vm, adj0, p0, adj0->sub_type.midchain.fixup_data); } if (is_mcast) { @@ -2432,7 +2443,7 @@ VLIB_REGISTER_NODE (ip6_rewrite_node) = .n_next_nodes = 2, .next_nodes = { - [IP6_REWRITE_NEXT_DROP] = "error-drop", + [IP6_REWRITE_NEXT_DROP] = "ip6-drop", [IP6_REWRITE_NEXT_ICMP_ERROR] = "ip6-icmp-error", }, }; @@ -3494,14 +3505,9 @@ ip6_config (vlib_main_t * vm, unformat_input_t * input) { if (unformat (input, "hash-buckets %d", &tmp)) nbuckets = tmp; - else if (unformat (input, "heap-size %dm", &tmp)) - heapsize = ((u64) tmp) << 20; - else if (unformat (input, "heap-size %dM", &tmp)) - heapsize = ((u64) tmp) << 20; - else if (unformat (input, "heap-size %dg", &tmp)) - heapsize = ((u64) tmp) << 30; - else if (unformat (input, "heap-size %dG", &tmp)) - heapsize = ((u64) tmp) << 30; + else if (unformat (input, "heap-size %U", + unformat_memory_size, &heapsize)) + ; else return clib_error_return (0, "unknown input '%U'", format_unformat_error, input);