aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_vty.c
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-12-16 20:33:34 +0100
committerAlexander Couzens <lynxis@fe80.eu>2020-12-16 21:34:03 +0100
commit8806796976e0997179cd6a8dd484520748c1c1e0 (patch)
tree803c8c91bb0ad5624db4321e7b6b79e140aa1312 /src/gb/gprs_ns2_vty.c
parent33c3c0655b683a5dbba1e1e9c813f24c9ba61194 (diff)
gprs_ns2_vty: udp: fixup dialect changes
Only accept receiving ipaccess style messages when use-reset-block is selected. If use-reset-block is disabled allow static NSVCs. Change-Id: Ia787528b1a6fac6bf1570c21643ef6cd8c209108
Diffstat (limited to 'src/gb/gprs_ns2_vty.c')
-rw-r--r--src/gb/gprs_ns2_vty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 742f181d..e33869bb 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -901,7 +901,8 @@ int gprs_ns2_vty_create() {
/* TODO: could not bind on the specific address */
return -1;
}
- bind->accept_ipaccess = true;
+
+ bind->accept_ipaccess = priv.vc_mode == NS2_VC_MODE_BLOCKRESET;
}
/* create vcs */
@@ -909,7 +910,10 @@ int gprs_ns2_vty_create() {
/* validate settings */
switch (vtyvc->ll) {
case GPRS_NS2_LL_UDP:
- dialect = NS2_DIALECT_IPACCESS;
+ if (priv.vc_mode == NS2_VC_MODE_BLOCKRESET)
+ dialect = NS2_DIALECT_IPACCESS;
+ else
+ dialect = NS2_DIALECT_STATIC_ALIVE;
if (strlen(vtyvc->remote.ip) == 0) {
/* Invalid IP for VC */
continue;