Merge branch 'gtp-fixes'

Andreas Schultz says:

====================
various gtp fixes

I'm sorry for the compile error mess up in the last version.
It's no excuse for not test compiling, but the hunks got lost in
a rebase.

This is the part of the previous "simple gtp improvements" series
that Pablo indicated should go into net.

The addition of the module alias fixes genl family autoloading,
clearing the DF bit fixes a protocol violation in regard to the
specification and the netns comparison fixes a corner case of
cross netns recv.

v2->v3: fix compiler error introduced in rebase
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+6 -7
+6 -7
drivers/net/gtp.c
··· 69 69 struct socket *sock0; 70 70 struct socket *sock1u; 71 71 72 - struct net *net; 73 72 struct net_device *dev; 74 73 75 74 unsigned int hash_size; ··· 315 316 316 317 netdev_dbg(gtp->dev, "encap_recv sk=%p\n", sk); 317 318 318 - xnet = !net_eq(gtp->net, dev_net(gtp->dev)); 319 + xnet = !net_eq(sock_net(sk), dev_net(gtp->dev)); 319 320 320 321 switch (udp_sk(sk)->encap_type) { 321 322 case UDP_ENCAP_GTP0: ··· 611 612 pktinfo.fl4.saddr, pktinfo.fl4.daddr, 612 613 pktinfo.iph->tos, 613 614 ip4_dst_hoplimit(&pktinfo.rt->dst), 614 - htons(IP_DF), 615 + 0, 615 616 pktinfo.gtph_port, pktinfo.gtph_port, 616 617 true, false); 617 618 break; ··· 657 658 static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize); 658 659 static void gtp_hashtable_free(struct gtp_dev *gtp); 659 660 static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, 660 - int fd_gtp0, int fd_gtp1, struct net *src_net); 661 + int fd_gtp0, int fd_gtp1); 661 662 662 663 static int gtp_newlink(struct net *src_net, struct net_device *dev, 663 664 struct nlattr *tb[], struct nlattr *data[]) ··· 674 675 fd0 = nla_get_u32(data[IFLA_GTP_FD0]); 675 676 fd1 = nla_get_u32(data[IFLA_GTP_FD1]); 676 677 677 - err = gtp_encap_enable(dev, gtp, fd0, fd1, src_net); 678 + err = gtp_encap_enable(dev, gtp, fd0, fd1); 678 679 if (err < 0) 679 680 goto out_err; 680 681 ··· 820 821 } 821 822 822 823 static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, 823 - int fd_gtp0, int fd_gtp1, struct net *src_net) 824 + int fd_gtp0, int fd_gtp1) 824 825 { 825 826 struct udp_tunnel_sock_cfg tuncfg = {NULL}; 826 827 struct socket *sock0, *sock1u; ··· 857 858 858 859 gtp->sock0 = sock0; 859 860 gtp->sock1u = sock1u; 860 - gtp->net = src_net; 861 861 862 862 tuncfg.sk_user_data = gtp; 863 863 tuncfg.encap_rcv = gtp_encap_recv; ··· 1374 1376 MODULE_AUTHOR("Harald Welte <hwelte@sysmocom.de>"); 1375 1377 MODULE_DESCRIPTION("Interface driver for GTP encapsulated traffic"); 1376 1378 MODULE_ALIAS_RTNL_LINK("gtp"); 1379 + MODULE_ALIAS_GENL_FAMILY("gtp");