gprs: Fix VTY NSVC initialisation bug by changing gprs_nsvc_create()

Currently the field nsvci_is_valid is set to 0 in the NSVC object
returned by gprs_nsvc_create(). This was a semantic change probably
introduced by commit 5e6d679d. As a result, NSVC created via the VTY
have this flag set to 0 causing RESET_ACK messages to be rejected.

This patch changes the default behaviour of gprs_nsvc_create() to
always set this flag. So it must be set to 0 explicitely if needed
which is more intuitive and thus less error prone.

It fixes breaking connections from the Gbproxy to the SGSN.

Ticket: OW#874
Sponsored-by: On-Waves ehf
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 55535ad..b500d9a 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -200,6 +200,7 @@
 
 	nsvc = talloc_zero(nsi, struct gprs_nsvc);
 	nsvc->nsvci = nsvci;
+	nsvc->nsvci_is_valid = 1;
 	/* before RESET procedure: BLOCKED and DEAD */
 	nsvc->state = NSE_S_BLOCKED;
 	nsvc->nsi = nsi;
@@ -794,7 +795,6 @@
 			     gprs_ns_ll_str(*nsvc));
 			orig_nsvc = *nsvc;
 			*nsvc = gprs_nsvc_create((*nsvc)->nsi, nsvci);
-			(*nsvc)->nsvci_is_valid = 1;
 			(*nsvc)->nsei  = nsei;
 		}
 	}
@@ -1193,6 +1193,7 @@
 	existing_nsvc = gprs_nsvc_by_nsvci(nsi, nsvci);
 	if (!existing_nsvc) {
 		*new_nsvc = gprs_nsvc_create(nsi, 0xffff);
+		(*new_nsvc)->nsvci_is_valid = 0;
 		log_set_context(GPRS_CTX_NSVC, *new_nsvc);
 		gprs_ns_ll_copy(*new_nsvc, fallback_nsvc);
 		LOGP(DNS, LOGL_INFO, "Creating NS-VC for BSS at %s\n",
@@ -1327,6 +1328,7 @@
 	/* Create the dummy NSVC that we use for sending
 	 * messages to non-existant/unknown NS-VC's */
 	nsi->unknown_nsvc = gprs_nsvc_create(nsi, 0xfffe);
+	nsi->unknown_nsvc->nsvci_is_valid = 0;
 	llist_del(&nsi->unknown_nsvc->list);
 
 	return nsi;
@@ -1527,8 +1529,6 @@
 		nsvc = gprs_nsvc_create(nsi, nsvci);
 	nsvc->ip.bts_addr = *dest;
 	nsvc->nsei = nsei;
-	nsvc->nsvci = nsvci;
-	nsvc->nsvci_is_valid = 1;
 	nsvc->remote_end_is_sgsn = 1;
 
 	gprs_nsvc_reset(nsvc, NS_CAUSE_OM_INTERVENTION);