aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/mma_template.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-10-31 01:51:04 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-01 09:29:25 +0000
commit7999e83a41ebad8a3f02cfcb2809cdb3aae919ba (patch)
tree58d7c95c87c3bb27bbeb045e22b4c6967defccc3 /src/vnet/session/mma_template.c
parentdf36f2176d7e90dcd3e895b08ee2d69f42d15426 (diff)
session: add support for proxying apps
To enable this, applications set the proxy flag in their attach requests and pass the transport protocols they want to act as proxies for as part of the attach options. When proxy is enabled, session rules that point incoming packets to the proxy app are addedd to the local and global session tables, if these scopes are accessible to the app. In particular, in case of the former, the rule accepts packets from all sources and all ports destined to the namespace's supporting interface address on any port. While in case of the latter, a generic any destination and any port rule is addedd. Change-Id: I791f8c1cc083350f02e26a2ac3bdbbfbfa19ece3 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/mma_template.c')
-rw-r--r--src/vnet/session/mma_template.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/session/mma_template.c b/src/vnet/session/mma_template.c
index 81333a73ee5..a8386695944 100644
--- a/src/vnet/session/mma_template.c
+++ b/src/vnet/session/mma_template.c
@@ -220,7 +220,11 @@ RT (mma_rules_table_del_rule) (RTT (mma_rules_table) * srt,
if (!RT (rule_is_match_for_key) (&rule->match, rp))
return ~0;
if (RT (rule_is_exact_match) (rule, rp))
- return 1;
+ {
+ if (rule_index == srt->root_index)
+ rp->action_index = SESSION_RULES_TABLE_INVALID_INDEX;
+ return 1;
+ }
for (i = 0; i < vec_len (rp->next_indices); i++)
{
rv = RT (mma_rules_table_del_rule) (srt, rule, rp->next_indices[i]);