Fix: don't abort if TUN attach fails

Remove an assert on successful dup() of a socket. At least when running
in phy-test mode without noS1, the socket does not exist, and the call
to dup() fails. In that case, we should carry on instead of simply
failing, similarly how the process does not abort when TUN setup fails.

Fixes: 8d2895463b ("Paging UE (SDAP): reattach TUN after idle reset")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
Robert Schmidt
2026-06-19 15:46:22 +02:00
parent 2d57ec1987
commit bbd8b295cf

View File

@@ -87,9 +87,13 @@ void nr_sdap_tun_attach(nr_sdap_entity_t *entity)
}
int d = dup(iface->sock);
AssertFatal(d >= 0, "dup(tun sock) failed: errno %d %s\n", errno, strerror(errno));
reblock_tun_socket(d);
if (d < 0)
LOG_W(SDAP, "dup(tun sock) failed: errno %d %s\n", errno, strerror(errno));
else
reblock_tun_socket(d);
entity->pdusession_sock = d;
if (d < 0)
return;
entity->stop_thread = false;
char thread_name[64];