aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
diff options
context:
space:
mode:
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);
}