mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user