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

Submitted by junpei yoshino on Aug. 19, 2016, 3 a.m.

Details

Message ID CAP_hEEB7ifMGsjxhjKFSkdPnPuyHg_jK-oxJv71gRPWR+Bk=eQ@mail.gmail.com
State New
Series "I can't look tei by tools/gtp-tunnel.c in GTPv1"
Headers show

Commit Message

junpei yoshino Aug. 19, 2016, 3 a.m.
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


        switch(type) {

Patch hide | download patch | download mbox

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;


Comments

Harald Welte Aug. 25, 2016, 4:08 a.m.
Hi Junpei,

thanks a lot for your bug fix / patch.

I've just committed it to the libgtpnl repository, see 345d687.