aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_tunnel.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-02 13:27:44 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-02 13:27:44 -0800
commit0afd4a21ba7d75e93fa79cf05d7a21774e149c0f (patch)
treea8b724ce55da03c5c1ea1152a57d7bb6c6b22ee6 /include/linux/if_tunnel.h
parentnet: packet socket packet_lookup_frame fix (diff)
downloadlinux-dev-0afd4a21ba7d75e93fa79cf05d7a21774e149c0f.tar.xz
linux-dev-0afd4a21ba7d75e93fa79cf05d7a21774e149c0f.zip
net: Fix userland breakage wrt. linux/if_tunnel.h
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>
Diffstat (limited to 'include/linux/if_tunnel.h')
-rw-r--r--include/linux/if_tunnel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index aeab2cb32a9c..82c43624c067 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -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)