diff --git a/lib/gtp/path.h b/lib/gtp/path.h index 6cb39ac77..7aecf6f7f 100644 --- a/lib/gtp/path.h +++ b/lib/gtp/path.h @@ -35,8 +35,6 @@ extern "C" { ogs_gtp_self()->gtpc_sock6 = \ ogs_socknode_sock_first(&ogs_gtp_self()->gtpc_list6); \ \ - ogs_assert(ogs_gtp_self()->gtpc_sock || ogs_gtp_self()->gtpc_sock6); \ - \ if (ogs_gtp_self()->gtpc_sock) \ ogs_gtp_self()->gtpc_addr = \ &ogs_gtp_self()->gtpc_sock->local_addr; \ @@ -44,8 +42,6 @@ extern "C" { ogs_gtp_self()->gtpc_addr6 = \ &ogs_gtp_self()->gtpc_sock6->local_addr; \ \ - ogs_assert(ogs_gtp_self()->gtpc_addr || ogs_gtp_self()->gtpc_addr6); \ - \ } while(0) #define OGS_SETUP_GTPU_SERVER \ diff --git a/src/mme/mme-gtp-path.c b/src/mme/mme-gtp-path.c index 7d9e8f3f3..0ef1da82d 100644 --- a/src/mme/mme-gtp-path.c +++ b/src/mme/mme-gtp-path.c @@ -203,6 +203,8 @@ int mme_gtp_open(void) } OGS_SETUP_GTPC_SERVER; + ogs_assert(ogs_gtp_self()->gtpc_sock || ogs_gtp_self()->gtpc_sock6); + ogs_assert(ogs_gtp_self()->gtpc_addr || ogs_gtp_self()->gtpc_addr6); mme_self()->pgw_addr = mme_pgw_addr_find_by_apn_enb( &mme_self()->pgw_list, AF_INET, NULL); diff --git a/src/sgwc/gtp-path.c b/src/sgwc/gtp-path.c index 6ce21e64f..8e850e7c9 100644 --- a/src/sgwc/gtp-path.c +++ b/src/sgwc/gtp-path.c @@ -129,6 +129,8 @@ int sgwc_gtp_open(void) } OGS_SETUP_GTPC_SERVER; + ogs_assert(ogs_gtp_self()->gtpc_sock || ogs_gtp_self()->gtpc_sock6); + ogs_assert(ogs_gtp_self()->gtpc_addr || ogs_gtp_self()->gtpc_addr6); return OGS_OK; } diff --git a/src/smf/gtp-path.c b/src/smf/gtp-path.c index 8d88ee20e..f4738658d 100644 --- a/src/smf/gtp-path.c +++ b/src/smf/gtp-path.c @@ -251,6 +251,9 @@ int smf_gtp_open(void) } OGS_SETUP_GTPC_SERVER; + /* If we only use 5G, we don't need GTP-C, so there is no check routine. */ + if (!ogs_gtp_self()->gtpc_sock && !ogs_gtp_self()->gtpc_sock6) + ogs_warn("No GTP-C configuration"); ogs_list_for_each(&ogs_gtp_self()->gtpu_list, node) { sock = ogs_gtp_server(node);