aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn/ggsn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ggsn/ggsn.c')
-rw-r--r--ggsn/ggsn.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 1e92956..c82f630 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -710,8 +710,12 @@ int main(int argc, char **argv)
maxfd = gsn->fd1u;
/* use GTP kernel module for data packet encapsulation */
- if (gtp_kernel_init(gsn, &net.v4, prefixlen, &args_info) < 0)
- goto err;
+ if (args_info.gtp_linux_given) {
+ if (gtp_kernel_init(gsn, &net.v4, prefixlen, args_info.net_arg) < 0) {
+ SYS_ERR(DGGSN, LOGL_ERROR, 0, "Failed to initialize kernel GTP\n");
+ goto err;
+ }
+ }
gtp_set_cb_data_ind(gsn, encaps_tun);
gtp_set_cb_delete_context(gsn, delete_context);