summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-01 23:16:11 +0000
committerDave Barach <openvpp@barachs.net>2020-04-02 11:28:01 +0000
commit57a5a2df5970f61259c9a14b5eb79358a2115b01 (patch)
treeb77c249a79c10dda35a07b32cac2e4e5ffce2a8f /src/vnet/session/session_node.c
parentdfd980fcffacc2bed90e53b9da669eac53025bb2 (diff)
udp session vcl: add udp iperf test
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib4bc2ce781887a84055a4d5cdb7f453fc7d52c79
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 66300bc6024..7d727b7e008 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -50,6 +50,8 @@ session_mq_listen_handler (void *data)
clib_memset (a, 0, sizeof (*a));
a->sep.is_ip4 = mp->is_ip4;
clib_memcpy_fast (&a->sep.ip, &mp->ip, sizeof (mp->ip));
+ if (mp->is_ip4)
+ ip46_address_mask_ip4 (&a->sep.ip);
a->sep.port = mp->port;
a->sep.fib_index = mp->vrf;
a->sep.sw_if_index = ENDPOINT_INVALID_INDEX;
@@ -113,6 +115,11 @@ session_mq_connect_handler (void *data)
a->sep.transport_proto = mp->proto;
a->sep.peer.fib_index = mp->vrf;
clib_memcpy_fast (&a->sep.peer.ip, &mp->lcl_ip, sizeof (mp->lcl_ip));
+ if (mp->is_ip4)
+ {
+ ip46_address_mask_ip4 (&a->sep.ip);
+ ip46_address_mask_ip4 (&a->sep.peer.ip);
+ }
a->sep.peer.port = mp->lcl_port;
a->sep.peer.sw_if_index = ENDPOINT_INVALID_INDEX;
a->sep_ext.parent_handle = mp->parent_handle;