From 4f873e9a268cc335ea0762f65ee9081992fcf370 Mon Sep 17 00:00:00 2001
From: rmagueta <rmagueta@allbesmart.pt>
Date: Mon, 12 Jul 2021 15:44:16 +0100
Subject: [PATCH] Fix IP packet received at gNB, to be sent to TUN interface

---
 openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
index 2f16abfe80..6078882601 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
@@ -445,8 +445,8 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
   int rb_id;
   int i;
 
-  if(UE_NAS_USE_TUN){
-    LOG_D(PDCP, "IP packet received, to be sent to UE TUN interface");
+  if(IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN){
+    LOG_D(PDCP, "IP packet received, to be sent to TUN interface");
     len = write(nas_sock_fd[0], buf, size);
     if (len != size) {
       LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
-- 
2.26.2