summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-03 00:58:48 +0000
committerDave Barach <openvpp@barachs.net>2020-04-03 14:57:12 +0000
commitd85666fdfd49a2b0a3ce5166c22c9efadf6ca239 (patch)
tree128ed23230deee135908280bbac44649ebba1a4f /src/vnet/udp/udp.c
parent888d9f05eff1801cbd6c5227eb22e464d3a117c3 (diff)
session udp: fix transport flags and migration
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r--src/vnet/udp/udp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index ba1821a5026..3632204f863 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -284,7 +284,11 @@ udp_session_cleanup (u32 connection_index, u32 thread_index)
{
udp_connection_t *uc;
uc = udp_connection_get (connection_index, thread_index);
- if (uc)
+ if (!uc)
+ return;
+ if (uc->flags & UDP_CONN_F_MIGRATED)
+ udp_connection_free (uc);
+ else
udp_connection_cleanup (uc);
}