ns2: move link layer type into NSE
Even it was in theory possible to mix NS-VC ll types within
a NSE. This is an unrealistic configuration.
Further more to select the correct load sharing mechanism
the NSE must know the correct link layer.
Change-Id: I18dfd40a2429cd61b7c4a3dad5f226c64296f7d8
diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index 75c70d7..80e3366 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -354,6 +354,7 @@
return -ENOSPC;
bind->driver = &vc_driver_fr;
+ bind->ll = GPRS_NS2_LL_FR;
bind->send_vc = fr_vc_sendmsg;
bind->free_vc = free_vc;
bind->dump_vty = dump_vty;
@@ -469,7 +470,7 @@
struct priv_vc *priv = NULL;
struct gprs_ns2_nse *nse = gprs_ns2_nse_by_nsei(bind->nsi, nsei);
if (!nse) {
- nse = gprs_ns2_create_nse(bind->nsi, nsei);
+ nse = gprs_ns2_create_nse(bind->nsi, nsei, GPRS_NS2_LL_FR);
if (!nse)
return NULL;
created_nse = true;
@@ -490,7 +491,6 @@
nsvc->nsvci = nsvci;
nsvc->nsvci_is_valid = true;
- nsvc->ll = GPRS_NS2_LL_FR;
gprs_ns2_vc_fsm_start(nsvc);