]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: Fix userland breakage wrt. linux/if_tunnel.h
authorDavid S. Miller <davem@davemloft.net>
Mon, 2 Feb 2009 21:27:44 +0000 (13:27 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Feb 2009 17:28:55 +0000 (09:28 -0800)
[ Upstream commit 0afd4a21ba7d75e93fa79cf05d7a21774e149c0f ]

Reported by Andrew Walrond <andrew@walrond.org>

Changeset c19e654ddbe3831252f61e76a74d661e1a755530
("gre: Add netlink interface") added an include
of linux/ip.h to linux/if_tunnel.h

We can't really let that get exposed to userspace
because this conflicts with types defined in netinet/ip.h
which userland is almost certainly going to have included
either explicitly or implicitly.

So guard this include with a __KERNEL__ ifdef.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/Kbuild
include/linux/if_tunnel.h

index 3a025d9d2a87b26d3f6724f97a77bd42d30297cb..d066bbcf798097ca2dd6849300fc4529ccee9aec 100644 (file)
@@ -92,7 +92,6 @@ header-y += if_ppp.h
 header-y += if_slip.h
 header-y += if_strip.h
 header-y += if_tun.h
-header-y += if_tunnel.h
 header-y += in_route.h
 header-y += ioctl.h
 header-y += ip6_tunnel.h
@@ -241,6 +240,7 @@ unifdef-y += if_phonet.h
 unifdef-y += if_pppol2tp.h
 unifdef-y += if_pppox.h
 unifdef-y += if_tr.h
+unifdef-y += if_tunnel.h
 unifdef-y += if_vlan.h
 unifdef-y += igmp.h
 unifdef-y += inet_diag.h
index aeab2cb32a9cd94048763941101bec458f2461d6..82c43624c067a132bec16e08abf07c6845c1b1df 100644 (file)
@@ -2,7 +2,10 @@
 #define _IF_TUNNEL_H_
 
 #include <linux/types.h>
+
+#ifdef __KERNEL__
 #include <linux/ip.h>
+#endif
 
 #define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)
 #define SIOCADDTUNNEL   (SIOCDEVPRIVATE + 1)