Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5197

to look at the new patch set (#2).

Fix display of GTP addresses

Previously we've tried to convert addresses manually which lead to
wrongly displayed GTP addresses (e. g. '4.0.0.0' instead of
'127.0.0.2'). Use libgtp function for conversion to fix it.

Change-Id: I695a9c9497d675564a088b002299096e0dcd267d
---
M src/gprs/sgsn_vty.c
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/97/5197/2

diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index c8dfc43..e9ce199 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -431,12 +431,12 @@
 
 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,

-- 
To view, visit https://gerrit.osmocom.org/5197
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I695a9c9497d675564a088b002299096e0dcd267d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to