aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gprs')
-rw-r--r--src/gprs/sgsn_vty.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index c8dfc437e..e9ce1998c 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -431,12 +431,12 @@ const struct value_string gprs_mm_st_strs[] = {
char *sgsn_gtp_ntoa(struct ul16_t *ul)
{
- if (ul->l == 4) {
- struct in_addr *ia = (struct in_addr *) ul;
- return inet_ntoa(*ia);
- } else {
+ struct in_addr ia;
+
+ if (gsna2in_addr(&ia, ul) != 0)
return "UNKNOWN";
- }
+
+ return inet_ntoa(ia);
}
static void vty_dump_pdp(struct vty *vty, const char *pfx,