summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_lookup.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-04 22:45:34 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-04-06 14:53:17 +0000
commit57660d9df62756c5db1516be0dbb48505f996e82 (patch)
treeee671df3eda25c82fa684f12c6542ada65e60d7d /src/vnet/session/session_lookup.c
parenta2ffc6c2fee60a2289aa9aa549de8a88e4ca2d98 (diff)
session udp: shared local endpoints
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie7102355b95eefb233ec7d146e61819051a7bf07
Diffstat (limited to 'src/vnet/session/session_lookup.c')
-rw-r--r--src/vnet/session/session_lookup.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index 986832346fc..4de6fdbe547 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -1289,6 +1289,19 @@ session_lookup_safe6 (u32 fib_index, ip6_address_t * lcl, ip6_address_t * rmt,
return 0;
}
+transport_connection_t *
+session_lookup_connection (u32 fib_index, ip46_address_t * lcl,
+ ip46_address_t * rmt, u16 lcl_port, u16 rmt_port,
+ u8 proto, u8 is_ip4)
+{
+ if (is_ip4)
+ return session_lookup_connection4 (fib_index, &lcl->ip4, &rmt->ip4,
+ lcl_port, rmt_port, proto);
+ else
+ return session_lookup_connection6 (fib_index, &lcl->ip6, &rmt->ip6,
+ lcl_port, rmt_port, proto);
+}
+
int
vnet_session_rule_add_del (session_rule_add_del_args_t * args)
{