aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-02-23 20:26:19 +0100
committerHarald Welte <laforge@gnumonks.org>2017-02-23 21:10:48 +0100
commit875e4dc8c3ac1c025f80ecd5531c96c840d42f26 (patch)
tree55129339b2a0b14986f777f32883ec9bcbffb9a5 /ggsn
parent68d244d3022d41a170f83ddec5050d659aef0bcd (diff)
gtp-kernel: Fix tunnel creation/removal for GTP Version 1
When Linux Kernel GTP-U support is enabled, OpenGGSN so far only worked with GTPv0,but not with GTPv1, as the TEI values were not correctly configured. This patch fixes the initialzation of the local and remote TEI before using libgtpnl to create a tunnel context in the kernel. Change-Id: I3e953ff5b4ab44c26dbbe20d18b61038fa57ff32
Diffstat (limited to 'ggsn')
-rw-r--r--ggsn/gtp-kernel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c
index 93dea23..dbe5a9f 100644
--- a/ggsn/gtp-kernel.c
+++ b/ggsn/gtp-kernel.c
@@ -192,7 +192,10 @@ int gtp_kernel_tunnel_add(struct pdp_t *pdp)
gtp_tunnel_set_tid(t, pdp_gettid(pdp->imsi, pdp->nsapi));
gtp_tunnel_set_flowid(t, pdp->flru);
} else {
- gtp_tunnel_set_tid(t, pdp->teid_gn); /* GTPIE_TEI_DI */
+ gtp_tunnel_set_i_tei(t, pdp->teid_own);
+ /* use the TEI advertised by SGSN when sending packets
+ * towards the SGSN */
+ gtp_tunnel_set_o_tei(t, pdp->teid_gn);
}
ret = gtp_add_tunnel(gtp_nl.genl_id, gtp_nl.nl, t);
@@ -221,7 +224,7 @@ int gtp_kernel_tunnel_del(struct pdp_t *pdp)
gtp_tunnel_set_tid(t, pdp_gettid(pdp->imsi, pdp->nsapi));
gtp_tunnel_set_flowid(t, pdp->flru);
} else {
- gtp_tunnel_set_tid(t, pdp->teid_gn); /* GTPIE_TEI_DI */
+ gtp_tunnel_set_i_tei(t, pdp->teid_own);
}
ret = gtp_del_tunnel(gtp_nl.genl_id, gtp_nl.nl, t);