aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-04 00:22:35 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-04 00:23:57 +0200
commitd9d8862a58702ba71b5194faa01ecf1eb234519c (patch)
tree7401683fa705ea4d6ea9c8efa180f2674836e05d /ggsn
parent283188790bb1b3af673d4edbd56ff649b7464e1e (diff)
Proper fix for "Force Dynamic IP" in Create PDP CTX
An EUA length of *2* octets indicates dynamic IP address, while an EUA length of 0 is invalid. Let's fix this hack (which needs to finally be removed anyway). Change-Id: Ib1b57eb0654327882044d6862d955f4b32aa6bcd
Diffstat (limited to 'ggsn')
-rw-r--r--ggsn/ggsn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 4d07f11..168e907 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -173,7 +173,9 @@ int create_context_ind(struct pdp_t *pdp)
DEBUGP(DGGSN, "Received create PDP context request\n");
- pdp->eua.l = 0; /* TODO: Indicates dynamic IP */
+ /* FIXME: we manually force all context requests to dynamic here! */
+ if (pdp->eua.l > 2)
+ pdp->eua.l = 2;
memcpy(pdp->qos_neg0, pdp->qos_req0, sizeof(pdp->qos_req0));
memcpy(&pdp->pco_neg, &pco, sizeof(pdp->pco_neg));