Skip to content

Commit

Permalink
net: Fix userland breakage wrt. linux/if_tunnel.h
Browse files Browse the repository at this point in the history
Reported by Andrew Walrond <andrew@walrond.org>

Changeset c19e654
("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>
  • Loading branch information
David S. Miller committed Feb 2, 2009
1 parent f9e6934 commit 0afd4a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,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
Expand Down Expand Up @@ -235,6 +234,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
Expand Down
3 changes: 3 additions & 0 deletions include/linux/if_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0afd4a2

Please sign in to comment.