On Mon, Nov 16, 2015 at 04:06:52PM +0100, Andreas Schultz wrote:
GTPv1 tunnel use a separate TEI for each direction.
Add a union
to hold TID for v0 and v1 separately.
Signed-off-by: Andreas Schultz <aschultz(a)tpip.net>
---
gtp.c | 211 +++++++++++++++++++++++++++++++++++----------------------------
gtp_nl.h | 2 +
2 files changed, 118 insertions(+), 95 deletions(-)
diff --git a/gtp.c b/gtp.c
index 2ac6431..a4be31d 100644
--- a/gtp.c
+++ b/gtp.c
@@ -39,7 +39,17 @@ struct pdp_ctx {
struct hlist_node hlist_tid;
struct hlist_node hlist_addr;
- u64 tid;
+ union {
+ uint64_t tid;
+ struct {
+ uint64_t tid;
+ u16 flow;
+ } v0 __attribute__((__packed__));
We're not sending this through network, so this packed attribute makes
no sense to me.