fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/36701?usp=email )
Change subject: VTY: move default settings to sgsn_instance_alloc() ......................................................................
VTY: move default settings to sgsn_instance_alloc()
Change-Id: I1a439dcc76272a181986b6ec9368ef16441dc098 Related: OS#6443 --- M src/sgsn/sgsn.c M src/sgsn/sgsn_vty.c 2 files changed, 15 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/01/36701/1
diff --git a/src/sgsn/sgsn.c b/src/sgsn/sgsn.c index 6619bf2..c3b7fda 100644 --- a/src/sgsn/sgsn.c +++ b/src/sgsn/sgsn.c @@ -36,6 +36,9 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/gsm/gsup.h>
+#include <osmocom/crypt/gprs_cipher.h> +#include <osmocom/crypt/utran_cipher.h> + #include <osmocom/sgsn/gprs_subscriber.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> @@ -162,6 +165,8 @@
inst->cfg.gtp_statedir = talloc_strdup(inst, "./"); inst->cfg.auth_policy = SGSN_AUTH_POLICY_CLOSED; + inst->cfg.gea_encryption_mask = (1 << GPRS_ALGO_GEA0); /* no encryption */ + inst->cfg.uea_encryption_mask = (1 << OSMO_UTRAN_UEA0); /* no encryption */ inst->cfg.require_authentication = true; /* only applies if auth_policy is REMOTE */ inst->cfg.gsup_server_port = OSMO_GSUP_PORT;
diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index 29f9cd6..6837e71 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -1868,9 +1868,6 @@ /* make sure sgsn_vty_init() was called before this */ OSMO_ASSERT(g_cfg);
- g_cfg->gea_encryption_mask = 0x1; /* support GEA0 by default unless specific encryption config exists */ - g_cfg->uea_encryption_mask = (1 << OSMO_UTRAN_UEA0); /* support UEA0 by default unless specific encryption config exists */ - rc = vty_read_config_file(config_file, NULL); if (rc < 0) { fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);