gtp: add flags to gtp_tunnel object
Flags tells us what fields have been set in this object.
This is required by
./gtp-tunnel del
otherwise, build helper function adds the MS/UE address and kernel reports
ENOENT, and tunnel identifier is ignored.
Update gtp-tunnel tool to set flowid to zero in the GTP version 0 case,
otherwise kernel reports EINVAL since now this flag is not ever set.
Change-Id: I66677ab2d4de2c459ed9987c465fce6f059d6d93
diff --git a/tools/gtp-tunnel.c b/tools/gtp-tunnel.c
index 1b8a7a0..8c8f95f 100644
--- a/tools/gtp-tunnel.c
+++ b/tools/gtp-tunnel.c
@@ -109,9 +109,10 @@
optidx++;
- if (gtp_version == GTP_V0)
+ if (gtp_version == GTP_V0) {
gtp_tunnel_set_tid(t, atoi(argv[optidx++]));
- else if (gtp_version == GTP_V1) {
+ gtp_tunnel_set_flowid(t, 0);
+ } else if (gtp_version == GTP_V1) {
gtp_tunnel_set_i_tei(t, atoi(argv[optidx++]));
gtp_tunnel_set_o_tei(t, atoi(argv[optidx++]));
}