sgsnemu: no outgoing GTP-U in "createif" mode

Submitted by Viktor Tsymbalyuk on Feb. 7, 2018, 3 p.m.

Details

Message ID a2473310-f331-c5e5-0bb9-1d42bb5427ed@gmail.com
State New
Series "sgsnemu: no outgoing GTP-U in "createif" mode"
Headers show

Commit Message

Viktor Tsymbalyuk Feb. 7, 2018, 3 p.m.
Hello,

I tried to run sgsnemu in "createif" mode - transfer traffic via tun 
interface.
tun interface created and routing too. But there are no outgoing GTP-U 
from test machine. (in my scenario sgsnemu on separated server).
 From gdb it looks, that in cb_tun_ind function ipm->pdp is 0x0, as result
gtp_data_req(gsn, ipm->pdp, pack, len);
not running.
After changes like below, it's start working. Does I correctly 
understood internal logic?




If need more test details, please let me know.

Patch hide | download patch | download mbox

diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c
index 630733b..cf4aa44 100644
--- a/sgsnemu/sgsnemu.c
+++ b/sgsnemu/sgsnemu.c
@@ -1462,7 +1462,7 @@  static int create_pdp_conf(struct pdp_t *pdp, void 
*cbp, int cause)
free(forwarding);
}

-       ipset((struct iphash_t *)pdp->peer, &addr);
+       ipset(iph, &addr);

         state = 2;              /* Connected */

Comments

Pau Espin Pedrol Feb. 9, 2018, 11:45 a.m.
Hi,

I did a quick look a few days ago but I couldn't find a direct answer to 
your provided change.

Can you please send a patch to gerrit so it doesn't get lost? You can 
add me as a reviewer, I'll have a deeper look when I have some time.