diff options
Diffstat (limited to 'src/plugins/map/map.c')
-rw-r--r-- | src/plugins/map/map.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c index 938793c8947..3cffadd39e8 100644 --- a/src/plugins/map/map.c +++ b/src/plugins/map/map.c @@ -176,6 +176,10 @@ map_create_domain (ip4_address_t * ip4_prefix, mm->ip6_src_prefix_tbl->add (mm->ip6_src_prefix_tbl, &d->ip6_src, d->ip6_src_len, *map_domain_index); + /* Let's build a table with the MAP rule ip6 prefixes as well [dgeist] */ + mm->ip6_prefix_tbl->add (mm->ip6_prefix_tbl, &d->ip6_prefix, + d->ip6_prefix_len, *map_domain_index); + /* Validate packet/byte counters */ map_domain_counter_lock (mm); int i; @@ -218,6 +222,9 @@ map_delete_domain (u32 map_domain_index) d->ip4_prefix_len); mm->ip6_src_prefix_tbl->delete (mm->ip6_src_prefix_tbl, &d->ip6_src, d->ip6_src_len); + /* Addition to remove the new table [dgeist] */ + mm->ip6_prefix_tbl->delete (mm->ip6_prefix_tbl, &d->ip6_prefix, + d->ip6_prefix_len); /* Release user-assigned MAP domain name. */ map_free_extras (map_domain_index); @@ -979,10 +986,8 @@ show_map_domain_command_fn (vlib_main_t * vm, unformat_input_t * input, /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) { - /* *INDENT-OFF* */ pool_foreach (d, mm->domains) {vlib_cli_output(vm, "%U", format_map_domain, d, counters);} - /* *INDENT-ON* */ return 0; } @@ -1008,10 +1013,8 @@ show_map_domain_command_fn (vlib_main_t * vm, unformat_input_t * input, if (map_domain_index == ~0) { - /* *INDENT-OFF* */ pool_foreach (d, mm->domains) {vlib_cli_output(vm, "%U", format_map_domain, d, counters);} - /* *INDENT-ON* */ } else { @@ -1062,7 +1065,6 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } - /* *INDENT-OFF* */ pool_foreach (d, mm->domains) { if (d->rules) { rulecount+= 0x1 << d->psid_length; @@ -1071,7 +1073,6 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input, domains += sizeof(*d); domaincount++; } - /* *INDENT-ON* */ vlib_cli_output (vm, "MAP domains structure: %d\n", sizeof (map_domain_t)); vlib_cli_output (vm, "MAP domains: %d (%d bytes)\n", domaincount, domains); @@ -1255,7 +1256,6 @@ done: } -/* *INDENT-OFF* */ /*? * Set or copy the IP TOS/Traffic Class field @@ -1312,7 +1312,7 @@ VLIB_CLI_COMMAND(map_pre_resolve_command, static) = { /*? * Enable or disable the MAP-E inbound security check - * Specifiy if the inbound security check should be done on fragments + * Specify if the inbound security check should be done on fragments * * @cliexpar * @cliexstart{map params security-check} @@ -1333,9 +1333,8 @@ VLIB_CLI_COMMAND(map_security_check_command, static) = { .function = map_security_check_command_fn, }; - /*? - * Specifiy the IPv4 source address used for relayed ICMP error messages + * Specify the IPv4 source address used for relayed ICMP error messages * * @cliexpar * @cliexstart{map params icmp source-address} @@ -1470,7 +1469,6 @@ VLIB_PLUGIN_REGISTER() = { .description = "Mapping of Address and Port (MAP)", }; -/* *INDENT-ON* */ /* * map_init |