X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fo1-interface.git;a=blobdiff_plain;f=ntsimulator%2Fntsim-ng%2Fcore%2Fframework.c;h=23a958ac12b4a901fdea50008d23af1cdb46dd19;hp=c916d96d28cc3ac3877cd3c6b9bd12a2dc79765c;hb=92903642ea9a10306817529ca546ea2432c741a1;hpb=1af4aebf2f891ff8e1b0396b01803d1788886a99 diff --git a/ntsimulator/ntsim-ng/core/framework.c b/ntsimulator/ntsim-ng/core/framework.c index c916d96..23a958a 100644 --- a/ntsimulator/ntsim-ng/core/framework.c +++ b/ntsimulator/ntsim-ng/core/framework.c @@ -287,6 +287,17 @@ static int framework_env_init(void) { } log_add_verbose(2, "[framework-env] host.ip = %s\n", framework_environment.host.ip); + if(framework_environment.settings.ip_v6_enabled) { + if(strstr(framework_environment.host.ip, ".")) { + log_error("[framework-env] host.ip is an invalid IP v6\n"); + } + } + else { + if(strstr(framework_environment.host.ip, ":")) { + log_error("[framework-env] host.ip is an invalid IP v4\n"); + } + } + log_add_verbose(2, "[framework-env] host.base_port = %d\n", framework_environment.host.base_port); log_add_verbose(2, "[framework-env] host.ssh_base_port = %d\n", framework_environment.host.ssh_base_port); log_add_verbose(2, "[framework-env] host.tls_base_port = %d\n", framework_environment.host.tls_base_port);