diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2016-02-03 15:50:41 +0100 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2016-02-04 15:52:19 +0100 |
commit | a04ff2d53b39bd9a49f7dcf09f9da2a67bbdeeab (patch) | |
tree | 443b1b275e553e120e452adc27afe6edda120f2b /openbsc/src/gprs/sgsn_libgtp.c | |
parent | b01304bc20122084278474ccb65f51612e03bd9d (diff) |
sgsn_iu/libgtp: Update pdp context with new IP address after RAB assigndaniel/gprs-iu
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.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 66efc1dad..7b039e196 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -220,16 +220,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; |