return;
de = vec_elt_at_index (mm->domain_extras, map_domain_index);
- if (!de)
- return;
-
vec_free (de->tag);
}
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;
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);
num_m_args++;
else if (unformat (line_input, "mtu %d", &mtu))
num_m_args++;
- else if (unformat (line_input, "tag %v", &tag))
+ else if (unformat (line_input, "tag %s", &tag))
;
else
{
mtu, flags, tag);
done:
+ vec_free (tag);
unformat_free (line_input);
return error;
/* 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* */
+ pool_foreach (d, mm->domains)
+ {vlib_cli_output(vm, "%U", format_map_domain, d, counters);}
return 0;
}
if (map_domain_index == ~0)
{
- /* *INDENT-OFF* */
- pool_foreach(d, mm->domains,
- ({vlib_cli_output(vm, "%U", format_map_domain, d, counters);}));
- /* *INDENT-ON* */
+ pool_foreach (d, mm->domains)
+ {vlib_cli_output(vm, "%U", format_map_domain, d, counters);}
}
else
{
return 0;
}
- /* *INDENT-OFF* */
- pool_foreach(d, mm->domains, ({
+ pool_foreach (d, mm->domains) {
if (d->rules) {
rulecount+= 0x1 << d->psid_length;
rules += sizeof(ip6_address_t) * 0x1 << d->psid_length;
}
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);
}
-/* *INDENT-OFF* */
/*?
* Set or copy the IP TOS/Traffic Class field
/*?
* 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}
.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}
.description = "Mapping of Address and Port (MAP)",
};
-/* *INDENT-ON* */
/*
* map_init