[PATCH][libgtpnl] I can't look tei by tools/gtp-tunnel.c in GTPv1

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

junpei yoshino junpei.yoshino at gmail.com
Fri Aug 19 03:00:40 UTC 2016


Hello

I can't look tei by gtp-tunnel in GTPv1.
I write patch for libgtpnl.

head version

$./tools/gtp-tunnel add hoge v1 65535 65535 10.0.3.2 192.168.0.2
$./tools/gtp-tunnel list
version 1 tei 0/0 ms_addr 10.0.3.2 sgsn_addr 192.168.0.2

fixed version

$./tools/gtp-tunnel add hoge v1 65535 65535 10.0.3.2 192.168.0.2
$./tools/gtp-tunnel list
version 1 tei 65535/65535 ms_addr 10.0.3.2 sgsn_addr 192.168.0.2


diff --git src/gtp-genl.c src/gtp-genl.c
index 1e77e06..24a640d 100644
--- src/gtp-genl.c
+++ src/gtp-genl.c
@@ -119,7 +119,7 @@ static int genl_gtp_validate_cb(const struct
nlattr *attr, void *data)
        const struct nlattr **tb = data;
        int type = mnl_attr_get_type(attr);

-       if (mnl_attr_type_valid(attr, CTRL_ATTR_MAX) < 0)
+       if (mnl_attr_type_valid(attr, GTPA_MAX) < 0)
                return MNL_CB_OK;

        switch(type) {


-- 
junpei.yoshino at gmail.com



More information about the osmocom-net-gprs mailing list