gbproxy_peer: Set rate_ctr name for gbproxy_peer stats

Change-Id: I60a5a208ab69ad1184ba643d063717a46a90b131
diff --git a/src/gb_proxy_peer.c b/src/gb_proxy_peer.c
index f5ad445..4eb427b 100644
--- a/src/gb_proxy_peer.c
+++ b/src/gb_proxy_peer.c
@@ -70,6 +70,7 @@
 
 struct gbproxy_bvc *gbproxy_bvc_alloc(struct gbproxy_nse *nse, uint16_t bvci)
 {
+	char idbuf[64];
 	struct gbproxy_bvc *bvc;
 	OSMO_ASSERT(nse);
 	struct gbproxy_config *cfg = nse->cfg;
@@ -79,12 +80,16 @@
 	if (!bvc)
 		return NULL;
 
+	snprintf(idbuf, sizeof(idbuf), "BVC%05u-NSE%05u", bvci,
+		 nse->nsei);
+	osmo_identifier_sanitize_buf(idbuf, NULL, '_');
 	bvc->bvci = bvci;
 	bvc->ctrg = rate_ctr_group_alloc(bvc, &bvc_ctrg_desc, (nse->nsei << 16) | bvci);
 	if (!bvc->ctrg) {
 		talloc_free(bvc);
 		return NULL;
 	}
+	rate_ctr_group_set_name(bvc->ctrg, idbuf);
 	bvc->nse = nse;
 
 	hash_add(nse->bvcs, &bvc->list, bvc->bvci);