diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-04-25 19:02:31 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-25 20:46:05 +0200 |
commit | 0406bdde75fc200754021f356c481059bae42b33 (patch) | |
tree | 835ed5bdc688bd32799ea34556e9ce95fae81974 /sgsnemu | |
parent | 97e7a98e0a25557e9156fe2f7b0bf7de44fab250 (diff) |
Move kernel GTP support from ggsn/ to lib/
This way, the IP address / route handling between TUN devices and kernel
GTP can be shared, which will provide not only a unified codebase but
also a more consistent behavior.
This also paves the road for to use kernel GTP from sgsnemu in the future.
Related: OS#3214
Change-Id: Ic53a971136edd0d8871fbd6746d7b0090ce3a188
Diffstat (limited to 'sgsnemu')
-rw-r--r-- | sgsnemu/Makefile.am | 6 | ||||
-rw-r--r-- | sgsnemu/sgsnemu.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sgsnemu/Makefile.am b/sgsnemu/Makefile.am index 4d02eca..9f10cd2 100644 --- a/sgsnemu/Makefile.am +++ b/sgsnemu/Makefile.am @@ -5,5 +5,11 @@ AM_LDFLAGS = @EXEC_LDFLAGS@ AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) sgsnemu_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) + +if ENABLE_GTP_KERNEL +AM_CFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS) +sgsnemu_LDADD += $(LIBGTPNL_LIBS) +endif + sgsnemu_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a sgsnemu_SOURCES = sgsnemu.c cmdline.c cmdline.h diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 92abc70..ebcfb44 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1571,7 +1571,7 @@ int main(int argc, char **argv) if (options.createif) { printf("Setting up interface\n"); /* Create a tunnel interface */ - if (tun_new((struct tun_t **)&tun, options.tun_dev_name)) { + if (tun_new((struct tun_t **)&tun, options.tun_dev_name, -1, -1, false)) { SYS_ERR(DSGSN, LOGL_ERROR, 0, "Failed to create tun"); exit(1); |