diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gtphub/gtphub.c | 2 | ||||
-rw-r--r-- | src/gtphub/gtphub_ares.c | 5 | ||||
-rw-r--r-- | src/gtphub/gtphub_main.c | 1 | ||||
-rw-r--r-- | src/gtphub/gtphub_sock.c | 5 |
4 files changed, 10 insertions, 3 deletions
diff --git a/src/gtphub/gtphub.c b/src/gtphub/gtphub.c index 2b00f59fe..937e6a4ff 100644 --- a/src/gtphub/gtphub.c +++ b/src/gtphub/gtphub.c @@ -475,7 +475,7 @@ static int get_ie_imsi_str(union gtpie_member *ie[], int i, * present but cannot be decoded. */ static int get_ie_apn_str(union gtpie_member *ie[], const char **apn_str) { - static char apn_buf[GSM_APN_LENGTH]; + static char apn_buf[APN_MAXLEN+1]; unsigned int len; if (gtpie_gettlv(ie, GTPIE_APN, 0, &len, apn_buf, sizeof(apn_buf)) != 0) diff --git a/src/gtphub/gtphub_ares.c b/src/gtphub/gtphub_ares.c index a2d8a4a12..774563db4 100644 --- a/src/gtphub/gtphub_ares.c +++ b/src/gtphub/gtphub_ares.c @@ -33,6 +33,7 @@ #include <osmocom/core/utils.h> #include <osmocom/gsm/apn.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> /* TODO split GRX ares from sgsn into a separate struct and allow use without * globals. */ @@ -56,8 +57,8 @@ struct ggsn_lookup { struct gtphub *hub; char imsi_str[GSM23003_IMSI_MAX_DIGITS+1]; - char apn_ni_str[GSM_APN_LENGTH]; - char apn_oi_str[GSM_APN_LENGTH]; + char apn_ni_str[APN_MAXLEN+1]; + char apn_oi_str[APN_MAXLEN+1]; int have_3dig_mnc; }; diff --git a/src/gtphub/gtphub_main.c b/src/gtphub/gtphub_main.c index 4d1e9cfd2..d25123eae 100644 --- a/src/gtphub/gtphub_main.c +++ b/src/gtphub/gtphub_main.c @@ -34,6 +34,7 @@ #include <osmocom/core/logging.h> #include <osmocom/core/utils.h> #include <osmocom/core/rate_ctr.h> +#include <osmocom/core/msgb.h> #include <osmocom/vty/logging.h> #include <osmocom/vty/telnet_interface.h> diff --git a/src/gtphub/gtphub_sock.c b/src/gtphub/gtphub_sock.c index 59a0d42a4..6f299d2d6 100644 --- a/src/gtphub/gtphub_sock.c +++ b/src/gtphub/gtphub_sock.c @@ -25,6 +25,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <errno.h> +#include <string.h> + +#include <osmocom/core/utils.h> + #include <osmocom/gtphub/gtphub.h> #include <osmocom/sgsn/debug.h> |