summaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_libgtp.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-02-03 15:50:41 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:11 +0100
commitf7436b22b3de13ec9ec130a03c295a8b53d395d3 (patch)
tree67e7ab5fc129330401f78e8b51f6b4a0002b74f7 /openbsc/src/gprs/sgsn_libgtp.c
parent711333c1137137508912000cc9e4398cf205c341 (diff)
sgsn_iu/libgtp: Update pdp context with new IP address after RAB assign
In the IU case the RNC and ggsn communicate directly on the user plane. Since the IP address of the RNC is not known in our case (it sits behind the hnbgw) we need to update the PDP context with the new IP address after receiving the RAB assignment response (which includes the IP address).
Diffstat (limited to 'openbsc/src/gprs/sgsn_libgtp.c')
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index a19823d88..d1610a6ac 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -221,16 +221,13 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
memcpy(pdp->gsnlc.v, &sgsn->cfg.gtp_listenaddr.sin_addr,
sizeof(sgsn->cfg.gtp_listenaddr.sin_addr));
- /* SGSN address for user plane */
+ /* SGSN address for user plane
+ * Default to the control plane addr for now. If we are connected to a
+ * hnbgw via IuPS we'll need to send a PDP context update with the
+ * correct IP address after the RAB Assignment is complete */
pdp->gsnlu.l = sizeof(sgsn->cfg.gtp_listenaddr.sin_addr);
-#if 1
- struct in_addr ia;
- ia.s_addr = htonl(0xC0A80032);
- memcpy(pdp->gsnlu.v, &ia, sizeof(ia));
-#else
memcpy(pdp->gsnlu.v, &sgsn->cfg.gtp_listenaddr.sin_addr,
sizeof(sgsn->cfg.gtp_listenaddr.sin_addr));
-#endif
/* Assume we are a GERAN system */
pdp->rattype.l = 1;