Add support for SGSN role via IFLA_GTP_ROLE

This patch corresponds to a Linux kernel patch extending the kernel GTP
to also cover the SGSN role, not just the GGSN role.  In order to keep
the API/behavior compatible, gtp_dev_create() will continue to create
GGSN-side tunnels, while a new gtp_dev_create_sgsn() is introduced to
create SGSN-side tunnels.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
diff --git a/src/gtp-rtnl.c b/src/gtp-rtnl.c
index 256de43..1dfd125 100644
--- a/src/gtp-rtnl.c
+++ b/src/gtp-rtnl.c
@@ -130,6 +130,8 @@
 	mnl_attr_put_u32(nlh, IFLA_GTP_FD0, fd0);
 	mnl_attr_put_u32(nlh, IFLA_GTP_FD1, fd1);
 	mnl_attr_put_u32(nlh, IFLA_GTP_PDP_HASHSIZE, 131072);
+	if (role != GTP_ROLE_GGSN)
+		mnl_attr_put_u32(nlh, IFLA_GTP_ROLE, role);
 	mnl_attr_nest_end(nlh, nest2);
 	mnl_attr_nest_end(nlh, nest);