[PATCH 03/16] gtp: convert the global gtp_instance_list to a per netns list

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Pablo Neira Ayuso pablo at soleta.eu
Mon Nov 16 17:39:53 UTC 2015


On Mon, Nov 16, 2015 at 04:06:44PM +0100, Andreas Schultz wrote:
> This add basic network namespace support by changing to global
> gtp_instance_list into a pre namespace list.
> Before this change all pdp context would be visible from all
> network namespaces, now only the namespace that they belong too,
> can see them.
> 
> Also selectively destroy all gtp devices when a namespace is
> destroyed.
> 
> Signed-off-by: Andreas Schultz <aschultz at tpip.net>
> ---
>  gtp.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 61 insertions(+), 9 deletions(-)
> 
> diff --git a/gtp.c b/gtp.c
> index 7e615f3..7c61e61 100644
> --- a/gtp.c
> +++ b/gtp.c
> @@ -20,13 +20,15 @@
>  #include <linux/net.h>
>  #include <linux/file.h>
>  
> +#include <net/net_namespace.h>
>  #include <net/protocol.h>
>  #include <net/ip.h>
>  #include <net/udp.h>
>  #include <net/icmp.h>
>  #include <net/xfrm.h>
>  #include <net/genetlink.h>
> -
> +#include <net/netns/generic.h>
> +#

This line above has slipped through, no problem I have fixed this here.

Applied.



More information about the OpenBSC mailing list